Conditions | 4 |
Paths | 6 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
10 | public static function getAbsFilePaths($dirs) |
||
11 | { |
||
12 | if (! $dirs) { |
||
13 | return []; |
||
14 | } |
||
15 | |||
16 | try { |
||
17 | $files = Finder::create()->files()->name('*.php')->in($dirs); |
||
18 | |||
19 | $paths = []; |
||
20 | foreach ($files as $f) { |
||
21 | $paths[] = $f->getRealPath(); |
||
22 | } |
||
23 | |||
24 | return $paths; |
||
25 | } catch (DirectoryNotFoundException $e) { |
||
26 | return []; |
||
27 | } |
||
28 | } |
||
29 | } |
||
30 |