mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-23 06:02:57 +02:00
Merge string concatenation into sprintf()
This commit is contained in:
@@ -22,6 +22,6 @@ class SizeForHumans extends ViewFunction
|
||||
$sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
||||
$factor = (int) floor((strlen((string) $fileSize) - 1) / 3);
|
||||
|
||||
return sprintf('%.2f', $fileSize / pow(1024, $factor)) . $sizes[$factor];
|
||||
return sprintf('%.2f%s', $fileSize / pow(1024, $factor), $sizes[$factor]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user