| Conditions | 6 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php declare(strict_types = 1); |
||
| 49 | 2 | public function getRoutes(): array |
|
| 50 | { |
||
| 51 | 2 | $routes = []; |
|
| 52 | 2 | foreach ($this->routes->getRoutes() as $route) { |
|
| 53 | 1 | if ((!$route->getHost() || $route->getHost() === $this->request->getUri()->getHost()) |
|
| 54 | 1 | && (!$route->getScheme() || $route->getScheme() === $this->request->getUri()->getScheme()) |
|
| 55 | ) { |
||
| 56 | 1 | $routes[] = $route; |
|
| 57 | } |
||
| 58 | } |
||
| 59 | |||
| 60 | 2 | return $routes; |
|
| 61 | } |
||
| 62 | |||
| 64 |