Conditions | 4 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | public static function includeAllFilesFromDirRecursive($dirPath): void |
||
29 | { |
||
30 | // include files from current dir |
||
31 | self::includeAllFilesFromDir($dirPath); |
||
32 | 3 | ||
33 | $filtered = []; |
||
34 | foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dirPath)) as $file) { |
||
35 | 3 | if (!in_array($file->getPathname(), get_included_files(), true)) { |
|
36 | 3 | if ($file->getExtension() === 'php') { |
|
37 | 3 | $filtered[] = $file; |
|
38 | 3 | include_once $file->getPathname(); |
|
39 | 3 | } |
|
44 |