Conditions | 4 |
Paths | 8 |
Total Lines | 12 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 5 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
16 | public function addToContainer(Container $c): void |
||
17 | { |
||
18 | $strategy = new ApplicationStrategy(); |
||
19 | $strategy->setContainer($c); |
||
20 | $router = $c[Router::class] = new Router(); |
||
21 | $router->setStrategy($strategy); |
||
22 | $consoleCommands = $c->has('consoleCommands') ? $c->get('consoleCommands') : []; |
||
23 | $blockedRoutes = $c->has('blockedRoutes') ? $c->get('blockedRoutes') : []; |
||
24 | $routeMiddleware = $c->has('routeMiddleware') ? $c->get('routeMiddleware') : []; |
||
25 | $consoleCommands[] = new RouterCommand($router, $blockedRoutes, $routeMiddleware); |
||
26 | $consoleCommands[] = new RouterTreeCommand($router); |
||
27 | $c['consoleCommands'] = $consoleCommands; |
||
28 | } |
||
30 |