Conditions | 3 |
Paths | 4 |
Total Lines | 17 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
12 | public function process(ContainerBuilder $container) |
||
13 | { |
||
14 | $extractors = array(); |
||
15 | |||
16 | foreach ($container->findTaggedServiceIds('incenteev_translation_checker.extractor') as $id => $tags) { |
||
17 | $extractors[] = new Reference($id); |
||
18 | } |
||
19 | |||
20 | // If there is only one configured extractor, skip the chain one |
||
21 | if (1 === count($extractors)) { |
||
22 | $container->setAlias('incenteev_translation_checker.extractor', new Alias((string) $extractors[0], $container->getAlias('incenteev_translation_checker.extractor')->isPublic())); |
||
23 | |||
24 | return; |
||
25 | } |
||
26 | |||
27 | $container->getDefinition('incenteev_translation_checker.extractor.chain')->replaceArgument(0, $extractors); |
||
28 | } |
||
29 | } |
||
30 |