Passed
Push — master ( 516163...07b934 )
by 世昌
02:15
created
public/dev.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 
5 5
 use nebula\component\request\Request;
6 6
 
7
-require_once __DIR__ .'/../vendor/autoload.php';
7
+require_once __DIR__.'/../vendor/autoload.php';
8 8
 
9 9
 $request = Request::buildFromServer();
10 10
 $request->apply(true);
@@ -12,13 +12,13 @@  discard block
 block discarded – undo
12 12
 var_dump($request);
13 13
 var_dump($request->getBasicURI());
14 14
 
15
-function formatBytes(int $bytes, int $precision=0)
15
+function formatBytes(int $bytes, int $precision = 0)
16 16
 {
17
-    $human= ['B', 'KB', 'MB', 'GB', 'TB'];
17
+    $human = ['B', 'KB', 'MB', 'GB', 'TB'];
18 18
     $bytes = max($bytes, 0);
19
-    $pow = floor(($bytes?log($bytes):0)/log(1024));
20
-    $pos = min($pow, count($human)-1);
21
-    $bytes /= (1 << (10* $pos));
19
+    $pow = floor(($bytes ?log($bytes) : 0) / log(1024));
20
+    $pos = min($pow, count($human) - 1);
21
+    $bytes /= (1 << (10 * $pos));
22 22
     return round($bytes, $precision).' '.$human[$pos];
23 23
 }
24 24
 
Please login to merge, or discard this patch.