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