Conditions | 6 |
Paths | 5 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 7.6393 |
Changes | 0 |
1 | <?php declare(strict_types = 1); |
||
45 | 4 | public function all(): array |
|
46 | { |
||
47 | 4 | $routes = []; |
|
48 | /** @var Route $route */ |
||
49 | 4 | foreach (parent::all() as $route) { |
|
50 | 4 | if (!$route->host() && $this->host) { |
|
51 | 1 | $route = $route->withHost($this->host); |
|
52 | } |
||
53 | 4 | if (!$route->scheme() && $this->scheme) { |
|
54 | 1 | $route = $route->secure(); |
|
55 | } |
||
56 | 4 | $routes[] = $route->withPath($this->addPathPrefix($route->path())); |
|
57 | } |
||
58 | |||
59 | 4 | return $routes; |
|
60 | } |
||
61 | |||
105 | } |