| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | 1 | public function register(Container $container) |
|
| 18 | { |
||
| 19 | $container->singleton(RouterInterface::class, function (Container $container) { |
||
| 20 | 1 | $framework = $container->get(FrameworkInterface::class); |
|
| 21 | 1 | $router = new Router($container->get(RequestHandlerBuilderInterface::class), new RoutingResultFactory()); |
|
| 22 | |||
| 23 | 1 | $routingPath = $framework->path('routes/api.php'); |
|
| 24 | 1 | require $routingPath; |
|
| 25 | |||
| 26 | 1 | return $router; |
|
| 27 | 1 | }); |
|
| 28 | |||
| 29 | 1 | $container->singleton(RoutingErrorResponderInterface::class, RoutingErrorResponder::class); |
|
| 30 | 1 | } |
|
| 31 | } |
||
| 32 |