diff --git a/Controller/ApiController.php b/Controller/ApiController.php index af39d86..8eeef64 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -279,7 +279,7 @@ final class ApiController extends Controller $status = !\is_dir($pdfDir) ? \mkdir($pdfDir, 0755, true) : true; if ($status === false) { - $response->set($request->uri->__toString(), new FormValidation($status)); + $response->set($request->uri->__toString(), new FormValidation(['status' => $status])); $response->header->status = RequestStatusCode::R_400; return; diff --git a/Controller/BackendController.php b/Controller/BackendController.php index abc313c..2a9286f 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -293,6 +293,7 @@ final class BackendController extends Controller $view->addData('currentCustomerRegion', $currentCustomerRegion); + $annualCustomerRegion = []; for ($i = 1; $i < 11; ++$i) { $annualCustomerRegion[] = [ 'year' => 2020 - 10 + $i, @@ -355,6 +356,7 @@ final class BackendController extends Controller $view->addData('currentCustomerRegion', $currentCustomerRegion); + $annualCustomerRegion = []; for ($i = 1; $i < 11; ++$i) { $annualCustomerRegion[] = [ 'year' => 2020 - 10 + $i, @@ -378,7 +380,9 @@ final class BackendController extends Controller ]; } - \uasort($currentCustomersRep, function($a, $b) { return $b['customers'] <=> $a['customers']; }); + \uasort($currentCustomersRep, function($a, $b) { + return $b['customers'] <=> $a['customers']; + }); $view->addData('currentCustomersRep', $currentCustomersRep); @@ -405,7 +409,9 @@ final class BackendController extends Controller ]; } - \uasort($currentCustomersCountry, function($a, $b) { return $b['customers'] <=> $a['customers']; }); + \uasort($currentCustomersCountry, function($a, $b) { + return $b['customers'] <=> $a['customers']; + }); $view->addData('currentCustomersCountry', $currentCustomersCountry); @@ -501,6 +507,7 @@ final class BackendController extends Controller $view->addData('currentCustomerRegion', $currentCustomerRegion); + $annualCustomerRegion = []; for ($i = 1; $i < 11; ++$i) { $annualCustomerRegion[] = [ 'year' => 2020 - 10 + $i, @@ -524,7 +531,9 @@ final class BackendController extends Controller ]; } - \uasort($currentCustomersRep, function($a, $b) { return $b['customers'] <=> $a['customers']; }); + \uasort($currentCustomersRep, function($a, $b) { + return $b['customers'] <=> $a['customers']; + }); $view->addData('currentCustomersRep', $currentCustomersRep); diff --git a/Models/Bill.php b/Models/Bill.php index 4529760..a2c3b1d 100755 --- a/Models/Bill.php +++ b/Models/Bill.php @@ -55,9 +55,7 @@ class Bill implements \JsonSerializable * @var int|BillType * @since 1.0.0 */ - public int | - -BillType $type = 0; + public int|BillType $type = 0; /** * Bill status. diff --git a/Models/BillElement.php b/Models/BillElement.php index 9a8d03b..64314e5 100755 --- a/Models/BillElement.php +++ b/Models/BillElement.php @@ -91,9 +91,7 @@ class BillElement implements \JsonSerializable */ public int $promotion = 0; - public int | - -Bill $bill = 0; + public int|Bill $bill = 0; /** * Constructor. diff --git a/Models/BillType.php b/Models/BillType.php index af50dfc..8f14cee 100755 --- a/Models/BillType.php +++ b/Models/BillType.php @@ -43,9 +43,7 @@ class BillType * * @var string|BillTypeL11n */ - protected string | - -BillTypeL11n $l11n; + protected string|BillTypeL11n $l11n; /** * Constructor. diff --git a/Models/BillTypeL11n.php b/Models/BillTypeL11n.php index df51dfd..6d1f6cf 100755 --- a/Models/BillTypeL11n.php +++ b/Models/BillTypeL11n.php @@ -41,9 +41,7 @@ class BillTypeL11n implements \JsonSerializable, ArrayableInterface * @var int * @since 1.0.0 */ - protected int | - -BillType $type = 0; + protected int|BillType $type = 0; /** * Language. diff --git a/composer.json b/composer.json index 7ad134b..7cf5769 100755 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "require-dev": { "phpunit/phpunit": ">=9.4", "friendsofphp/php-cs-fixer": ">=3.0", - "squizlabs/php_codesniffer": ">=3.5", + "squizlabs/php_codesniffer": ">=3.6", "phpmd/phpmd": ">=2.9", "phpstan/phpstan": ">=0.12.58", "phan/phan": ">=3.2.6"