| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 37 | 9 | public static function merge(WritableInterface $container, RouterInterface $router) |
|
| 38 | { |
||
| 39 | 9 | if ($container->has(self::COMPOSITE)) { |
|
| 40 | 9 | $composite = $container->get(self::COMPOSITE); |
|
| 41 | |||
| 42 | 9 | $composite->merge($router); |
|
| 43 | 9 | } else { |
|
| 44 | 9 | $composite = (new CompositeRouter)->merge($router); |
|
| 45 | } |
||
| 46 | |||
| 47 | 9 | return $container->set(self::COMPOSITE, $composite); |
|
| 48 | } |
||
| 50 |