Passed
Push — master ( e6f852...fe1bfe )
by Giuliano
09:42
created
src/Foundation/FolderReader.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
     static public function read(string $path, int $level) : array
10 10
     {        
11
-        if (! is_dir($path)) return [];
11
+        if (!is_dir($path)) return [];
12 12
         
13 13
         self::scan($path, 1, $level);
14 14
         
@@ -24,16 +24,16 @@  discard block
 block discarded – undo
24 24
         $folder = '';
25 25
         $items  = array_diff(scandir($path), array('.', '..'));        
26 26
         
27
-        foreach($items as $item) {
27
+        foreach ($items as $item) {
28 28
 
29 29
             $folder = "$path/$item"; 
30 30
 
31
-            if (! is_dir($folder)) {
31
+            if (!is_dir($folder)) {
32 32
                 continue;
33 33
             }
34 34
             
35 35
             if (is_dir($folder) && $step < $level) {
36
-                self::scan($folder, $step+1, $level);
36
+                self::scan($folder, $step + 1, $level);
37 37
             }
38 38
 
39 39
             if ($step == $level) {
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,9 @@
 block discarded – undo
8 8
 
9 9
     static public function read(string $path, int $level) : array
10 10
     {        
11
-        if (! is_dir($path)) return [];
11
+        if (! is_dir($path)) {
12
+            return [];
13
+        }
12 14
         
13 15
         self::scan($path, 1, $level);
14 16
         
Please login to merge, or discard this patch.