Passed
Branch master (cd50f5)
by compolom
02:57 queued 01:13
created
src/Storage.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace Compolomus\BinaryFileStorage;
4 4
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         return $dir;
36 36
     }
37 37
 
38
-    public function check(array $input): ?array
38
+    public function check(array $input): ? array
39 39
     {
40 40
         if (\count($input)) {
41 41
             return $this->add($this->upload->process($input));
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     private function add(array $file): array
63 63
     {
64 64
         return array_map(
65
-            function (File $file) {
65
+            function(File $file) {
66 66
                 $data = $file->getData();
67 67
                 $md5 = $data['md5'];
68 68
                 $dir = $this->createDir($md5);
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     {
90 90
         $alpha = [" Bytes", " KB", " MB", " GB", " TB", " PB", " EB", " ZB", " YB"];
91 91
         return $size ? \round($size / \pow(1024, ($iterator = \floor(\log($size, 1024)))),
92
-                2) . $alpha[(int)$iterator] : '0 Bytes';
92
+                2) . $alpha[(int) $iterator] : '0 Bytes';
93 93
     }
94 94
 
95 95
     public function dirName(string $file): string
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                 $this->config['secondDirLen']);
100 100
     }
101 101
 
102
-    public function getInfoFile(string $file): ?array
102
+    public function getInfoFile(string $file): ? array
103 103
     {
104 104
         $fileName = $this->dirName($file) . DIRECTORY_SEPARATOR . $file . '.json';
105 105
         return \is_file($fileName) ? \json_decode(\file_get_contents($fileName), true) : null;
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                     'time' => $splFileObject->getMTime()
117 117
                 ];
118 118
             }
119
-            \uasort($files, function (array $first, array $second): int {
119
+            \uasort($files, function(array $first, array $second): int {
120 120
                 return ($first['time'] <=> $second['time']);
121 121
             });
122 122
         }
Please login to merge, or discard this patch.