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