bug fixes and template adjustments

This commit is contained in:
Dennis Eichhorn 2021-07-31 17:20:48 +02:00
parent 9dce2fc6e5
commit 788d182cbe
4 changed files with 10 additions and 9 deletions

View File

@ -247,6 +247,7 @@ final class BackendController extends Controller
$view->addData('currentCustomerRegion', $currentCustomerRegion); $view->addData('currentCustomerRegion', $currentCustomerRegion);
$annualCustomerRegion = [];
for ($i = 1; $i < 11; ++$i) { for ($i = 1; $i < 11; ++$i) {
$annualCustomerRegion[] = [ $annualCustomerRegion[] = [
'year' => 2020 - 10 + $i, '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); $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); $view->addData('currentCustomersCountry', $currentCustomersCountry);

View File

@ -68,9 +68,7 @@ class ClientAttributeType implements \JsonSerializable, ArrayableInterface
* *
* @var string | ClientAttributeTypeL11n * @var string | ClientAttributeTypeL11n
*/ */
protected string | protected string|ClientAttributeTypeL11n $l11n;
ClientAttributeTypeL11n $l11n;
/** /**
* Possible default attribute values * Possible default attribute values

View File

@ -41,9 +41,7 @@ class ClientAttributeTypeL11n implements \JsonSerializable, ArrayableInterface
* @var int|ClientAttributeType * @var int|ClientAttributeType
* @since 1.0.0 * @since 1.0.0
*/ */
protected int | protected int|ClientAttributeType $type = 0;
ClientAttributeType $type = 0;
/** /**
* Language. * Language.

View File

@ -10,7 +10,7 @@
"require-dev": { "require-dev": {
"phpunit/phpunit": ">=9.4", "phpunit/phpunit": ">=9.4",
"friendsofphp/php-cs-fixer": ">=3.0", "friendsofphp/php-cs-fixer": ">=3.0",
"squizlabs/php_codesniffer": ">=3.5", "squizlabs/php_codesniffer": ">=3.6",
"phpmd/phpmd": ">=2.9", "phpmd/phpmd": ">=2.9",
"phpstan/phpstan": ">=0.12.58", "phpstan/phpstan": ">=0.12.58",
"phan/phan": ">=3.2.6" "phan/phan": ">=3.2.6"