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