Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public static function getPathToFiles(array $patterns): array |
||
14 | { |
||
15 | $pathToFiles = [[]]; |
||
16 | foreach ($patterns as $pattern) { |
||
17 | if (is_file($pattern)) { |
||
18 | $pathToFiles[] = [$pattern]; |
||
19 | } else { |
||
20 | $pathToFiles[] = self::globRecursive($pattern); |
||
21 | } |
||
22 | } |
||
23 | |||
24 | $pathToFiles = array_merge(...$pathToFiles); |
||
25 | $pathToFiles = str_replace('\\', '/', $pathToFiles); |
||
26 | |||
27 | return array_unique($pathToFiles); |
||
28 | } |
||
48 |