summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/pages/list.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2023-11-14 14:47:55 +0100
committerSimon Rettberg2023-11-14 14:47:55 +0100
commit06bff0b9b84d47c43f9bc8aff06a29d85ebb7ed0 (patch)
tree7e5493b102074672d8cfd8fe1a61e49f080edbe8 /modules-available/statistics/pages/list.inc.php
parentUpdate phpstorm config (diff)
downloadslx-admin-06bff0b9b84d47c43f9bc8aff06a29d85ebb7ed0.tar.gz
slx-admin-06bff0b9b84d47c43f9bc8aff06a29d85ebb7ed0.tar.xz
slx-admin-06bff0b9b84d47c43f9bc8aff06a29d85ebb7ed0.zip
Add function param/return types, fix a lot more phpstorm complaints
Diffstat (limited to 'modules-available/statistics/pages/list.inc.php')
-rw-r--r--modules-available/statistics/pages/list.inc.php17
1 files changed, 2 insertions, 15 deletions
diff --git a/modules-available/statistics/pages/list.inc.php b/modules-available/statistics/pages/list.inc.php
index 12689e97..b318cc68 100644
--- a/modules-available/statistics/pages/list.inc.php
+++ b/modules-available/statistics/pages/list.inc.php
@@ -22,10 +22,7 @@ class SubPage
}
- /**
- * @param \StatisticsFilterSet $filterSet
- */
- private static function showMachineList(StatisticsFilterSet $filterSet)
+ private static function showMachineList(StatisticsFilterSet $filterSet): void
{
Module::isAvailable('js_stupidtable');
$filterSet->makeFragments($where, $join, $args);
@@ -160,7 +157,7 @@ class SubPage
$roomsvg = null;
$side = [];
if (!empty($rows) && !empty($colValCount)) {
- if (count($colValCount['locationid']) === 1 && ($lid = array_key_first($colValCount['locationid']))
+ if (count($colValCount['locationid']) === 1 && ($lid = array_key_first($colValCount['locationid'])) !== null
&& Module::isAvailable('roomplanner')) {
$roomsvg = PvsGenerator::generateSvg($lid, false, 0, 1, true, $colValCount['locationid'][$lid]);
}
@@ -216,14 +213,4 @@ class SubPage
return $ret;
}
-}
-
-// Remove when we require >= 7.3.0
-if (!function_exists('array_key_first')) {
- function array_key_first(array $arr) {
- foreach($arr as $key => $unused) {
- return $key;
- }
- return NULL;
- }
} \ No newline at end of file