Passed
Push — develop ( f63a3f...ecbe19 )
by Jens
03:02
created
cloudcontrol/library/cc/StringUtil.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -78,12 +78,15 @@
 block discarded – undo
78 78
 	 */
79 79
 	public static function humanFileSize($size, $unit = "")
80 80
 	{
81
-		if ((!$unit && $size >= 1 << 30) || $unit == "GB")
82
-			return number_format($size / (1 << 30), 2) . "GB";
83
-		if ((!$unit && $size >= 1 << 20) || $unit == "MB")
84
-			return number_format($size / (1 << 20), 2) . "MB";
85
-		if ((!$unit && $size >= 1 << 10) || $unit == "KB")
86
-			return number_format($size / (1 << 10), 2) . "KB";
81
+		if ((!$unit && $size >= 1 << 30) || $unit == "GB") {
82
+					return number_format($size / (1 << 30), 2) . "GB";
83
+		}
84
+		if ((!$unit && $size >= 1 << 20) || $unit == "MB") {
85
+					return number_format($size / (1 << 20), 2) . "MB";
86
+		}
87
+		if ((!$unit && $size >= 1 << 10) || $unit == "KB") {
88
+					return number_format($size / (1 << 10), 2) . "KB";
89
+		}
87 90
 
88 91
 		return number_format($size) . " bytes";
89 92
 	}
Please login to merge, or discard this patch.