Total Complexity | 4 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
9 | class BubblingPath implements FilterInterface |
||
10 | { |
||
11 | /** |
||
12 | * @param array $paths Array of paths. |
||
13 | * @return array Valid paths. |
||
14 | */ |
||
15 | 1 | public function filter(array $paths) |
|
16 | { |
||
17 | 1 | $filteredPaths = []; |
|
18 | 1 | foreach ($paths as $path) { |
|
19 | 1 | if ($this->containsBubblingPath($path)) { |
|
20 | 1 | continue; |
|
21 | } |
||
22 | 1 | $filteredPaths[] = $path; |
|
23 | } |
||
24 | 1 | return $filteredPaths; |
|
25 | } |
||
26 | |||
27 | /** |
||
28 | * @param string $path |
||
29 | * @return boolean |
||
30 | */ |
||
31 | 1 | private function containsBubblingPath($path) |
|
34 | } |
||
35 | } |