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