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