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