Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
35 | public function getDefinitions() : array |
||
36 | { |
||
37 | return [ |
||
38 | 1 | RouteDispatcherInterface::class => function (Container $container) { |
|
39 | |||
40 | $method = new MethodParameterResolver($container); |
||
41 | |||
42 | return new RouteDispatcher( |
||
43 | new DispatcherChain( |
||
44 | new DispatchClosure($method), |
||
45 | new DispatchController($container, $method) |
||
46 | ), |
||
47 | $container->make(RouterInterface::class)->all() |
||
48 | ); |
||
49 | 1 | }, |
|
50 | 1 | RouterInterface::class => $this->loader->loadRoutes(new Router) |
|
51 | ]; |
||
52 | } |
||
53 | } |
||
54 |