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