Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | public function load(mixed $resource, ?string $type = null): RouteCollection |
||
28 | { |
||
29 | if ($this->isLoaded) { |
||
30 | throw new RuntimeException('Do not add the "audit" loader twice'); |
||
31 | } |
||
32 | |||
33 | $routeCollection = new RouteCollection(); |
||
34 | if (true === $this->configuration['viewer']) { |
||
35 | $routeCollection = $this->annotatedRouteControllerLoader->load(ViewerController::class); |
||
36 | } |
||
37 | |||
38 | $this->isLoaded = true; |
||
39 | |||
40 | return $routeCollection; |
||
41 | } |
||
51 |