Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
13 | public function process(ContainerBuilder $container) |
||
14 | { |
||
15 | if (!$container->has('loevgaard_dandomain_consignment.consignment_service_collection')) { |
||
16 | return; |
||
17 | } |
||
18 | |||
19 | $definition = $container->findDefinition('loevgaard_dandomain_consignment.consignment_service_collection'); |
||
20 | |||
21 | $taggedServices = $container->findTaggedServiceIds('ldc.consignment_service'); |
||
22 | |||
23 | foreach ($taggedServices as $id => $tags) { |
||
24 | $definition->addMethodCall('addConsignmentService', [new Reference($id)]); |
||
25 | } |
||
26 | } |
||
27 | } |
||
28 |