Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2.0185 |
Changes | 0 |
1 | <?php |
||
36 | 12 | private static function globRecursive(string $pattern): array |
|
37 | { |
||
38 | 12 | $pathNames = glob($pattern, GLOB_BRACE); |
|
39 | 12 | $files = array_filter($pathNames, 'is_file'); |
|
40 | |||
41 | 12 | foreach (glob(dirname($pattern) . '/*', GLOB_ONLYDIR | GLOB_NOSORT) as $dir) { |
|
42 | $files = array_merge($files, self::globRecursive($dir . '/' . basename($pattern))); |
||
43 | } |
||
44 | |||
45 | 12 | return $files; |
|
46 | } |
||
48 |