Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
26 | 4 | public function process(ContainerBuilder $container) |
|
27 | { |
||
28 | 4 | if (false === $container->hasDefinition('dpn_xml_sitemap.manager')) { |
|
29 | 1 | return; |
|
30 | } |
||
31 | |||
32 | 3 | $definition = $container->getDefinition( |
|
33 | 'dpn_xml_sitemap.manager' |
||
34 | 3 | ); |
|
35 | |||
36 | 3 | $taggedServices = $container->findTaggedServiceIds( |
|
37 | 'dpn_xml_sitemap.generator' |
||
38 | 3 | ); |
|
39 | |||
40 | 3 | foreach ($taggedServices as $id => $attributes) { |
|
41 | 3 | $definition->addMethodCall('addGenerator', array(new Reference($id))); |
|
42 | 3 | } |
|
43 | 3 | } |
|
44 | } |
||
45 |