Killing a few "mutants"
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
2023-11-03 12:02:44 +00:00
parent 61001edaa0
commit 66ccb3d8d6
5 changed files with 37 additions and 12 deletions

View File

@@ -38,7 +38,7 @@ class TwigExtension extends AbstractExtension
public function formatBytes($bytes, $precision = 2)
{
$size = ['B','kB','MB','GB','TB','PB','EB','ZB','YB'];
$fact = (int)(floor((strlen((string)$bytes) - 1) / 3));
$fact = (int)floor((strlen((string)$bytes) - 1) / 3);
return sprintf("%.{$precision}f", $bytes / pow(1024, $fact)) . $size[$fact];
}
}