Total Complexity | 10 |
Total Lines | 69 |
Duplicated Lines | 0 % |
Coverage | 95.83% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | final class YamlRecursivePathsFinder |
||
10 | { |
||
11 | /** |
||
12 | * @var array |
||
13 | */ |
||
14 | private $paths; |
||
15 | |||
16 | /** |
||
17 | * YamlRecursivePathsFinder constructor. |
||
18 | * |
||
19 | * @param array $paths |
||
20 | */ |
||
21 | 1 | public function __construct(array $paths) |
|
22 | { |
||
23 | 1 | $this->paths = []; |
|
24 | |||
25 | 1 | if (false !== $paths = array_combine($paths, $paths)) { |
|
26 | 1 | $this->paths = $paths; |
|
27 | } |
||
28 | 1 | } |
|
29 | |||
30 | /** |
||
31 | * @return array |
||
32 | */ |
||
33 | 1 | public function getAllPaths() |
|
34 | { |
||
35 | 1 | $this->findPathRecursively($this->paths); |
|
36 | |||
37 | 1 | return $this->paths; |
|
38 | } |
||
39 | |||
40 | /** |
||
41 | * @param array $paths |
||
42 | */ |
||
43 | 1 | private function findPathRecursively(array $paths): void |
|
60 | } |
||
61 | } |
||
62 | 1 | } |
|
63 | |||
64 | /** |
||
65 | * @param string $path |
||
66 | * |
||
67 | * @return mixed |
||
68 | */ |
||
69 | 1 | private function getImports($path) |
|
78 | } |
||
79 | } |
||
80 |