| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public function register(Container $container): void |
||
| 32 | 8 | { |
|
| 33 | 8 | $container->set(RouteCollectorInterface::class, Group::create()); |
|
| 34 | 8 | ||
| 35 | 8 | $container->set(UrlMatcherInterface::class, function (ContainerInterface $container) { |
|
| 36 | $collector = $container->get(RouteCollectorInterface::class); |
||
| 37 | $collector->addGroup( |
||
| 38 | 8 | Group::create(null, $this->routes) |
|
| 39 | 8 | ->addMiddleware(FormatDataResponse::class) |
|
| 40 | ); |
||
| 41 | 8 | ||
| 42 | 8 | return new UrlMatcher(new RouteCollection($collector)); |
|
| 43 | }); |
||
| 44 | |||
| 45 | $container->set(UrlGeneratorInterface::class, UrlGenerator::class); |
||
| 46 | } |
||
| 48 |