summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/pages/machine.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2023-11-15 17:53:47 +0100
committerSimon Rettberg2023-11-15 17:53:47 +0100
commitaa49154e5a9ee135c3f0286ddda8a01a5290b1ed (patch)
tree0397403f11a8a890ee11458ea0b1887796480115 /modules-available/statistics/pages/machine.inc.php
parentidea: Always inspect as if strict_types is enabled (diff)
downloadslx-admin-aa49154e5a9ee135c3f0286ddda8a01a5290b1ed.tar.gz
slx-admin-aa49154e5a9ee135c3f0286ddda8a01a5290b1ed.tar.xz
slx-admin-aa49154e5a9ee135c3f0286ddda8a01a5290b1ed.zip
Fix more type errors, stricter typing
Diffstat (limited to 'modules-available/statistics/pages/machine.inc.php')
-rw-r--r--modules-available/statistics/pages/machine.inc.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules-available/statistics/pages/machine.inc.php b/modules-available/statistics/pages/machine.inc.php
index 24bf7c1e..fe82797d 100644
--- a/modules-available/statistics/pages/machine.inc.php
+++ b/modules-available/statistics/pages/machine.inc.php
@@ -219,9 +219,9 @@ class SubPage
$client['live_cpuidle'] = 100 - $client['live_cpuload'];
}
$client['live_cputemppercent'] = max(0, min(100, 110 - $client['live_cputemp']));
- $client['ramclass'] = StatisticsStyling::ramColorClass($client['mbram']);
+ $client['ramclass'] = StatisticsStyling::ramColorClass((int)$client['mbram']);
$client['kvmclass'] = StatisticsStyling::kvmColorClass($client['kvmstate']);
- $client['hddclass'] = StatisticsStyling::hddColorClass($client['gbtmp']);
+ $client['hddclass'] = StatisticsStyling::hddColorClass((int)$client['gbtmp']);
// Format HDD data to strings
foreach ($hdds['hdds'] as &$hdd) {
$hdd['smart_status_failed'] = !($client['smart_status//passed'] ?? 1);
@@ -405,8 +405,8 @@ class SubPage
}
if (count($spans['rows']) > 10) {
$spans['hasrows2'] = true;
- $spans['rows2'] = array_slice($spans['rows'], ceil(count($spans['rows']) / 2));
- $spans['rows'] = array_slice($spans['rows'], 0, ceil(count($spans['rows']) / 2));
+ $spans['rows2'] = array_slice($spans['rows'], (int)ceil(count($spans['rows']) / 2));
+ $spans['rows'] = array_slice($spans['rows'], 0, (int)ceil(count($spans['rows']) / 2));
}
$spans['isclient'] = $client['isclient'];
Render::addTemplate('machine-usage', $spans);