| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | 9 | public function register(WritableInterface $container) |
|
| 35 | { |
||
| 36 | 9 | $routes = array(); |
|
| 37 | |||
| 38 | 9 | foreach ((array) $this->routers as $router) |
|
| 39 | { |
||
| 40 | 9 | $item = $container->get((string) $router); |
|
| 41 | |||
| 42 | 9 | $current = (array) $item->routes(); |
|
| 43 | |||
| 44 | 9 | $routes = array_merge($routes, $current); |
|
| 45 | 3 | } |
|
| 46 | |||
| 47 | 9 | $router = new Router((array) $routes); |
|
| 48 | |||
| 49 | 9 | $dispatcher = new Dispatcher($router); |
|
| 50 | |||
| 51 | 9 | return $container->set(self::DISPATCHER, $dispatcher); |
|
| 52 | } |
||
| 54 |