@@ -39,7 +39,7 @@ |
||
39 | 39 | |
40 | 40 | $files = array_diff(scandir($folder), array('.', '..')); |
41 | 41 | |
42 | - foreach ($files as $file) { |
|
42 | + foreach ($files as $file) { |
|
43 | 43 | |
44 | 44 | $item = "$folder/$file"; |
45 | 45 |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function files(string $pattern = null) : array |
30 | 30 | { |
31 | - $pattern = "/". $pattern ."/"; |
|
31 | + $pattern = "/" . $pattern . "/"; |
|
32 | 32 | |
33 | 33 | $this->scan($this->path(), $pattern); |
34 | 34 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | private function setPath(string $path) : FileSearch |
100 | 100 | { |
101 | - if (! is_dir($path)) { |
|
101 | + if (!is_dir($path)) { |
|
102 | 102 | throw new Exception('Path not found.'); |
103 | 103 | } |
104 | 104 |
@@ -45,11 +45,11 @@ |
||
45 | 45 | { |
46 | 46 | $items = array_diff(scandir($path), array('.', '..')); |
47 | 47 | |
48 | - foreach ($items as $item) { |
|
48 | + foreach ($items as $item) { |
|
49 | 49 | |
50 | 50 | $item = "$path/$item"; |
51 | 51 | |
52 | - if (is_dir($item)) { |
|
52 | + if (is_dir($item)) { |
|
53 | 53 | $this->scan($item, $pattern); |
54 | 54 | continue; |
55 | 55 | } |
@@ -151,7 +151,7 @@ |
||
151 | 151 | */ |
152 | 152 | public function load(string $filename) : ?string |
153 | 153 | { |
154 | - if (! $this->exists($filename)) { |
|
154 | + if (!$this->exists($filename)) { |
|
155 | 155 | return null; |
156 | 156 | } |
157 | 157 |