Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 5.5022 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | 1 | public function process(ContainerBuilder $container) |
|
24 | { |
||
25 | 1 | if (!$container->has(self::REGISTRY_ID)) { |
|
26 | return; |
||
27 | } |
||
28 | |||
29 | 1 | $definition = $container->findDefinition(self::REGISTRY_ID); |
|
30 | |||
31 | 1 | $taggedServices = $container->findTaggedServiceIds(self::HANDLER_TAG); |
|
32 | 1 | foreach ($taggedServices as $id => $tags) { |
|
33 | foreach ($tags as $attributes) { |
||
34 | $definition->addMethodCall( |
||
35 | self::ADD_FUNCTION_NAME, |
||
36 | [$attributes['name'], new Reference($id)] |
||
37 | ); |
||
38 | } |
||
39 | } |
||
40 | 1 | } |
|
41 | } |
||
42 |