bug fixes and template adjustments

This commit is contained in:
Dennis Eichhorn 2021-07-31 17:20:49 +02:00
parent 0e76d8bf1c
commit 5eec86cd9f
5 changed files with 18 additions and 12 deletions

View File

@ -497,6 +497,7 @@ final class BackendController extends Controller
$view->addData('currentCustomerRegion', $currentCustomerRegion);
$annualCustomerRegion = [];
for ($i = 1; $i < 11; ++$i) {
$annualCustomerRegion[] = [
'year' => 2020 - 10 + $i,
@ -520,7 +521,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);
@ -547,7 +550,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);
@ -664,6 +669,7 @@ final class BackendController extends Controller
$view->addData('currentCustomerRegion', $currentCustomerRegion);
$annualCustomerRegion = [];
for ($i = 1; $i < 11; ++$i) {
$annualCustomerRegion[] = [
'year' => 2020 - 10 + $i,
@ -687,7 +693,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);
@ -714,7 +722,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 File

@ -216,7 +216,7 @@ class Item
/**
* Get attributes
*
* @return ItemAttribute[]
* @return int[]|ItemAttribute[]
*
* @since 1.0.0
*/

View File

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

View File

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

View File

@ -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"