Update code style

This commit is contained in:
Darko Gjorgjijoski
2024-02-08 03:37:17 +01:00
parent e14a248f24
commit 36424bbf05
2 changed files with 4 additions and 6 deletions

View File

@@ -402,7 +402,7 @@ class Invoice extends Model implements HasMedia
$data['customer_sequence_number'] = $serial->nextCustomerSequenceNumber; $data['customer_sequence_number'] = $serial->nextCustomerSequenceNumber;
$statusData = $this->getInvoiceStatusByAmount($data['due_amount']); $statusData = $this->getInvoiceStatusByAmount($data['due_amount']);
if(!empty($statusData)) { if (! empty($statusData)) {
$data = array_merge($data, $statusData); $data = array_merge($data, $statusData);
} }
@@ -696,7 +696,6 @@ class Invoice extends Model implements HasMedia
/** /**
* Set the invoice status from amount. * Set the invoice status from amount.
* @param $amount
* *
* @return array * @return array
*/ */
@@ -729,15 +728,14 @@ class Invoice extends Model implements HasMedia
/** /**
* Changes the invoice status right away * Changes the invoice status right away
* @param $amount
* *
* @return string[]|void * @return string[]|void
*/ */
public function changeInvoiceStatus($amount) public function changeInvoiceStatus($amount)
{ {
$status = $this->getInvoiceStatusByAmount($amount); $status = $this->getInvoiceStatusByAmount($amount);
if(!empty($status)) { if (! empty($status)) {
foreach($status as $key => $value) { foreach ($status as $key => $value) {
$this->setAttribute($key, $value); $this->setAttribute($key, $value);
} }
$this->save(); $this->save();

View File

@@ -8,7 +8,7 @@ trait GeneratesMenuTrait
{ {
$new_items = []; $new_items = [];
$menu = \Menu::get($key); $menu = \Menu::get($key);
$items = $menu ? $menu->items->toArray() : []; $items = $menu ? $menu->items->toArray() : [];
foreach ($items as $data) { foreach ($items as $data) {