From 788d182cbebe9884620e93ead6a889a3fd93413b Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 31 Jul 2021 17:20:48 +0200 Subject: [PATCH] bug fixes and template adjustments --- Controller/BackendController.php | 9 +++++++-- Models/ClientAttributeType.php | 4 +--- Models/ClientAttributeTypeL11n.php | 4 +--- composer.json | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 090f487..c553305 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -247,6 +247,7 @@ final class BackendController extends Controller $view->addData('currentCustomerRegion', $currentCustomerRegion); + $annualCustomerRegion = []; for ($i = 1; $i < 11; ++$i) { $annualCustomerRegion[] = [ 'year' => 2020 - 10 + $i, @@ -270,7 +271,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); @@ -297,7 +300,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); diff --git a/Models/ClientAttributeType.php b/Models/ClientAttributeType.php index 3ea913d..69b836b 100755 --- a/Models/ClientAttributeType.php +++ b/Models/ClientAttributeType.php @@ -68,9 +68,7 @@ class ClientAttributeType implements \JsonSerializable, ArrayableInterface * * @var string | ClientAttributeTypeL11n */ - protected string | - -ClientAttributeTypeL11n $l11n; + protected string|ClientAttributeTypeL11n $l11n; /** * Possible default attribute values diff --git a/Models/ClientAttributeTypeL11n.php b/Models/ClientAttributeTypeL11n.php index 27fb954..e0b65b0 100755 --- a/Models/ClientAttributeTypeL11n.php +++ b/Models/ClientAttributeTypeL11n.php @@ -41,9 +41,7 @@ class ClientAttributeTypeL11n implements \JsonSerializable, ArrayableInterface * @var int|ClientAttributeType * @since 1.0.0 */ - protected int | - -ClientAttributeType $type = 0; + protected int|ClientAttributeType $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"