| Conditions | 4 |
| Paths | 4 |
| Total Lines | 22 |
| Code Lines | 12 |
| Lines | 11 |
| Ratio | 50 % |
| Tests | 7 |
| CRAP Score | 6.8476 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 2 | public function process(ContainerBuilder $container) |
|
| 31 | { |
||
| 32 | // always first check if the primary service is defined |
||
| 33 | 2 | if (!$container->has('graviton.proxy.service.loaderfactory')) { |
|
| 34 | return; |
||
| 35 | } |
||
| 36 | |||
| 37 | 2 | $definition = $container->findDefinition('graviton.proxy.service.loaderfactory'); |
|
| 38 | 2 | $taggedServices = $container->findTaggedServiceIds('graviton.proxy.definition.loader'); |
|
| 39 | |||
| 40 | 2 | View Code Duplication | foreach ($taggedServices as $id => $tags) { |
| 41 | foreach ($tags as $attributes) { |
||
| 42 | $definition->addMethodCall( |
||
| 43 | 'addLoaderDefinition', |
||
| 44 | array( |
||
| 45 | new Reference($id), |
||
| 46 | $attributes["alias"] |
||
| 47 | ) |
||
| 48 | ); |
||
| 49 | } |
||
| 50 | 1 | } |
|
| 51 | 2 | } |
|
| 52 | } |
||
| 53 |