| 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 | 9 | public function process(ContainerBuilder $container) |
|
| 28 | { |
||
| 29 | 9 | if (!$container->hasDefinition($this->service)) { |
|
| 30 | return; |
||
| 31 | } |
||
| 32 | |||
| 33 | 9 | 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 | 8 | $connectionFactory = $container->getDefinition($this->service); |
|
| 38 | 8 | $connectionFactory->replaceArgument(0, $factories); |
|
| 39 | } |
||
| 41 |