| Conditions | 4 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | 6 | public function process(ContainerBuilder $container) |
|
| 19 | { |
||
| 20 | 6 | $definition = $container->getDefinition('innmind_neo4j.repository_factory.configurator'); |
|
| 21 | 6 | $ids = $container->findTaggedServiceIds('innmind_neo4j.repository'); |
|
| 22 | |||
| 23 | 6 | foreach ($ids as $id => $tags) { |
|
| 24 | 4 | foreach ($tags as $tag) { |
|
| 25 | 4 | if (!isset($tag['class'])) { |
|
| 26 | 2 | throw new RuntimeException( |
|
| 27 | 2 | 'The class attribute must be defined' |
|
| 28 | ); |
||
| 29 | } |
||
| 30 | |||
| 31 | 2 | $definition->addMethodCall( |
|
| 32 | 2 | 'register', |
|
| 33 | 2 | [$tag['class'], new Reference($id)] |
|
| 34 | ); |
||
| 39 |