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