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