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 all(): array |
|
50 | { |
||
51 | 2 | $routes = []; |
|
52 | 2 | foreach ($this->routes->all() as $route) { |
|
53 | 1 | if ((!$route->host() || $route->host() === $this->request->getUri()->getHost()) |
|
54 | 1 | && (!$route->scheme() || $route->scheme() === $this->request->getUri()->getScheme()) |
|
55 | ) { |
||
56 | 1 | $routes[] = $route; |
|
57 | } |
||
58 | } |
||
59 | |||
60 | 2 | return $routes; |
|
61 | } |
||
62 | |||
64 |