Total Complexity | 4 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Coverage | 83.33% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | final class PathFinder implements PathFinderInterface |
||
11 | { |
||
12 | /** |
||
13 | * @return string[] |
||
14 | */ |
||
15 | 20 | public function matchingPattern(string $pattern): array |
|
16 | { |
||
17 | 20 | $this->ensureGlobBraceIsDefined(); |
|
18 | |||
19 | 20 | return glob($pattern, GLOB_BRACE) ?: []; |
|
20 | } |
||
21 | |||
22 | /** |
||
23 | * Note: The GLOB_BRACE flag is not available on some non GNU systems, like Solaris or Alpine Linux. |
||
24 | * |
||
25 | * @see https://www.php.net/manual/en/function.glob.php |
||
26 | */ |
||
27 | 20 | private function ensureGlobBraceIsDefined(): void |
|
31 | } |
||
32 | } |
||
34 |