Conditions | 3 |
Paths | 4 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
37 | 5 | public function __invoke( $path, $regex = null ) |
|
38 | { |
||
39 | 5 | $regex = $regex ?: '/\.(' . implode('|', $this->extensions) . ')$/i'; |
|
40 | |||
41 | 5 | return realpath( $path ) |
|
42 | 5 | ? $this->finder |
|
43 | 5 | ->ignoreUnreadableDirs() |
|
44 | 5 | ->in( $path ) |
|
45 | 5 | ->ignoreDotFiles(true) |
|
46 | 5 | ->files() |
|
47 | 5 | ->name( $regex ) |
|
48 | 5 | : array(); |
|
49 | } |
||
50 | } |
||
51 |