| Conditions | 4 |
| Paths | 4 |
| Total Lines | 22 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 15 |
| CRAP Score | 4.0039 |
| 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 | foreach ($taggedServices as $id => $tags) { |
|
| 41 | 2 | foreach ($tags as $attributes) { |
|
| 42 | 2 | $definition->addMethodCall( |
|
| 43 | 2 | 'addLoaderDefinition', |
|
| 44 | array( |
||
| 45 | 2 | new Reference($id), |
|
| 46 | 2 | $attributes["alias"] |
|
| 47 | 1 | ) |
|
| 48 | 1 | ); |
|
| 49 | 1 | } |
|
| 50 | 1 | } |
|
| 51 | 2 | } |
|
| 52 | } |
||
| 53 |