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