Improve type safety

This commit is contained in:
2026-07-06 19:58:44 +02:00
parent ee82d70f21
commit 896ef024d2
+1 -1
View File
@@ -89,7 +89,7 @@ final class MDOutputHandler {
private function _human_filesize(int $bytes, int $decimals = 2):string {
$size = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
$factor = floor((strlen((string)$bytes) - 1) / 3);
$factor = (int)floor((strlen((string)$bytes) - 1) / 3);
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . $size[$factor];
}