Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
27 | 5 | public function match(CollectionRoute $routes, string $path): \Generator |
|
28 | { |
||
29 | 5 | foreach ($routes->getRoutes() as $route) { |
|
30 | 4 | $activeRoute = $this->matchRule($route, $path); |
|
31 | 4 | if ($activeRoute !== null) { |
|
32 | 4 | yield $activeRoute; |
|
33 | } |
||
34 | } |
||
35 | |||
36 | 2 | return yield $this->routeNotFound; |
|
37 | } |
||
38 | |||
54 |