Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3.0261 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | 8 | public function process(ContainerBuilder $container) |
|
28 | { |
||
29 | 8 | if (!$container->hasDefinition($this->service)) { |
|
30 | return; |
||
31 | } |
||
32 | |||
33 | 8 | if (!$factories = $this->findAndSortTaggedServices($this->tag, $container)) { |
|
34 | 1 | throw new RuntimeException(sprintf('You must tag at least one service as "%s" to use the "%s" service.', $this->tag, $this->service)); |
|
35 | } |
||
36 | |||
37 | 7 | $connectionFactory = $container->getDefinition($this->service); |
|
38 | 7 | $connectionFactory->replaceArgument(0, $factories); |
|
39 | 7 | } |
|
41 |