| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3.0067 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 4 | public function process(ContainerBuilder $container) |
|
| 31 | { |
||
| 32 | 4 | if (!$container->has(self::REGISTRY_ID)) { |
|
| 33 | return; |
||
| 34 | } |
||
| 35 | |||
| 36 | 4 | $handler = []; |
|
| 37 | 4 | $taggedServices = $container->findTaggedServiceIds(self::HANDLER_TAG); |
|
| 38 | 4 | foreach ($taggedServices as $id => $tags) { |
|
| 39 | 3 | $service = $container->getDefinition($id); |
|
| 40 | 3 | $handler[$service->getClass()] = new Reference($id); |
|
| 41 | } |
||
| 42 | |||
| 43 | 4 | $definition = $container->findDefinition(self::REGISTRY_ID); |
|
| 44 | 4 | $definition->replaceArgument(0, $handler); |
|
| 45 | 4 | } |
|
| 46 | } |
||
| 47 |