| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | public function process(ContainerBuilder $container) |
||
| 33 | { |
||
| 34 | if (!$container->hasDefinition('fos_elastica.index_manager')) { |
||
| 35 | return; |
||
| 36 | } |
||
| 37 | |||
| 38 | $indexes = []; |
||
| 39 | foreach ($container->findTaggedServiceIds('fos_elastica.index') as $id => $tags) { |
||
| 40 | foreach ($tags as $tag) { |
||
| 41 | $indexes[$tag['name']] = new Reference($id); |
||
| 42 | } |
||
| 43 | } |
||
| 44 | |||
| 45 | $container->getDefinition('fos_elastica.index_manager')->replaceArgument(0, $indexes); |
||
| 46 | } |
||
| 47 | } |
||
| 48 |