Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3.0261 |
Changes | 0 |
1 | <?php |
||
34 | public function create(): RouteCollectionInterface |
||
35 | { |
||
36 | 6 | if ($this->routeCollection) { |
|
37 | return $this->routeCollection; |
||
38 | } |
||
39 | |||
40 | 6 | $collection = new RouteCollection(); |
|
41 | |||
42 | 6 | $locator = $this->routeLocatorFactory->create(); |
|
43 | 6 | foreach ($locator->locate() as $route) { |
|
44 | 6 | $collection->addRoute($route); |
|
45 | } |
||
46 | |||
47 | 6 | return $this->routeCollection = $collection; |
|
48 | } |
||
50 |