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