| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function process(ContainerBuilder $container): void |
||
| 23 | { |
||
| 24 | if (!$container->has('bitbag_sylius_cms_plugin.importer.chain')) { |
||
| 25 | return; |
||
| 26 | } |
||
| 27 | |||
| 28 | $container |
||
| 29 | ->registerForAutoconfiguration(ImporterInterface::class) |
||
| 30 | ->addTag(self::TAG_ID) |
||
| 31 | ; |
||
| 32 | |||
| 33 | $taggedServices = $container->findTaggedServiceIds(self::TAG_ID); |
||
| 34 | $definition = $container->findDefinition('bitbag_sylius_cms_plugin.importer.chain'); |
||
| 35 | |||
| 36 | foreach ($taggedServices as $id => $tags) { |
||
| 37 | $definition->addMethodCall('addImporter', [new Reference($id)]); |
||
| 38 | } |
||
| 41 |