| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4.0218 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | 10 | public function process(ContainerBuilder $container) |
|
| 24 | { |
||
| 25 | 10 | if (!$container->hasDefinition('fos_elastica.index_manager')) { |
|
| 26 | return; |
||
| 27 | } |
||
| 28 | |||
| 29 | 10 | $indexes = []; |
|
| 30 | 10 | foreach ($container->findTaggedServiceIds('fos_elastica.index') as $id => $tags) { |
|
| 31 | 10 | foreach ($tags as $tag) { |
|
| 32 | 10 | $indexes[$tag['name']] = new Reference($id); |
|
| 33 | } |
||
| 34 | } |
||
| 35 | |||
| 36 | 10 | $container->getDefinition('fos_elastica.index_manager')->replaceArgument(0, $indexes); |
|
| 37 | 10 | } |
|
| 38 | } |
||
| 39 |