From 896ef024d260960c33f1b675ea592abd077e07d7 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Mon, 6 Jul 2026 19:58:44 +0200 Subject: [PATCH] Improve type safety --- src/MDOutputHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MDOutputHandler.php b/src/MDOutputHandler.php index e6475c8..8d4d0a3 100644 --- a/src/MDOutputHandler.php +++ b/src/MDOutputHandler.php @@ -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]; }