Conditions | 4 |
Paths | 4 |
Total Lines | 19 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function process(ContainerBuilder $container) |
||
20 | { |
||
21 | if (!$container->hasDefinition(self::EXPECTATION_MANAGER)) { |
||
22 | return; |
||
23 | } |
||
24 | |||
25 | $definition = $container->getDefinition(self::EXPECTATION_MANAGER); |
||
26 | |||
27 | $taggedServices = $container->findTaggedServiceIds(self::EXPECTATION_TAG); |
||
28 | |||
29 | foreach ($taggedServices as $id => $tags) { |
||
30 | foreach ($tags as $attributes) { |
||
31 | $definition->addMethodCall( |
||
32 | 'add', |
||
33 | [new Reference($id), $attributes['alias']] |
||
34 | ); |
||
35 | } |
||
36 | } |
||
37 | } |
||
38 | } |
||
39 |