@@ -3,7 +3,7 @@ discard block |
||
| 3 | 3 | */ |
| 4 | 4 | function scandir_r($directory) { |
| 5 | 5 | // $files = array_slice(scandir($directory, SCANDIR_SORT_NONE), 2); |
| 6 | - if (! $entries = scandir($directory)) { |
|
| 6 | + if ( ! $entries = scandir($directory)) { |
|
| 7 | 7 | throw new \InvalidArgumentException("Error during scandir"); |
| 8 | 8 | } |
| 9 | 9 | |
@@ -11,12 +11,12 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | $map = []; |
| 13 | 13 | foreach ($files as $file) { |
| 14 | - if (is_dir( $directory . '/' . $file)) { |
|
| 15 | - $submap = scandir_r($directory . '/' . $file); |
|
| 14 | + if (is_dir($directory.'/'.$file)) { |
|
| 15 | + $submap = scandir_r($directory.'/'.$file); |
|
| 16 | 16 | $map = array_merge($map, $submap); |
| 17 | 17 | } |
| 18 | 18 | else { |
| 19 | - $map[] = $directory . '/' . $file; |
|
| 19 | + $map[] = $directory.'/'.$file; |
|
| 20 | 20 | } |
| 21 | 21 | } |
| 22 | 22 | |
@@ -56,11 +56,11 @@ discard block |
||
| 56 | 56 | if ($missing = array_diff($sorted_map, $map)) { |
| 57 | 57 | throw new \Exception( |
| 58 | 58 | "Missing file in your classmap. Please add it manually to " |
| 59 | - . __FILE__ . "\n" |
|
| 59 | + . __FILE__."\n" |
|
| 60 | 60 | . var_export($missing, true) |
| 61 | 61 | ); |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | foreach ($sorted_map as $filepath) { |
| 65 | - require_once($root . '/' . $filepath); |
|
| 65 | + require_once($root.'/'.$filepath); |
|
| 66 | 66 | } |
@@ -1,7 +1,8 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | */ |
| 4 | -function scandir_r($directory) { |
|
| 4 | +function scandir_r($directory) |
|
| 5 | +{ |
|
| 5 | 6 | // $files = array_slice(scandir($directory, SCANDIR_SORT_NONE), 2); |
| 6 | 7 | if (! $entries = scandir($directory)) { |
| 7 | 8 | throw new \InvalidArgumentException("Error during scandir"); |