Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | 5 | protected function addMethodCallToCrawler(ContainerBuilder $container, $tag, $methodName) |
|
17 | { |
||
18 | 5 | if (!$container->hasDefinition('mediamonks_crawler.crawler')) { |
|
19 | 2 | return; |
|
20 | } |
||
21 | |||
22 | 3 | $definition = $container->findDefinition('mediamonks_crawler.crawler'); |
|
23 | |||
24 | 3 | $taggedServices = $container->findTaggedServiceIds($tag); |
|
25 | 3 | foreach ($taggedServices as $id => $tags) { |
|
26 | 3 | $definition->addMethodCall($methodName, [new Reference($id)]); |
|
27 | 3 | } |
|
28 | 3 | } |
|
29 | } |
||
30 |