| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 4 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | 6 | public function process(ContainerBuilder $container) |
|
| 19 | { |
||
| 20 | 6 | if (! $container->hasDefinition('alchemy_rest.transformer_registry')) { |
|
| 21 | 2 | return; |
|
| 22 | } |
||
| 23 | |||
| 24 | 4 | $transformerRegistry = $container->findDefinition('alchemy_rest.transformer_registry'); |
|
| 25 | 4 | $transformerTags = $container->findTaggedServiceIds('alchemy_rest.transformer'); |
|
| 26 | |||
| 27 | 4 | foreach ($transformerTags as $id => $tags) { |
|
| 28 | 2 | foreach ($tags as $tag) { |
|
| 29 | 2 | $transformerRegistry->addMethodCall('setTransformer', array($tag['alias'], new Reference($id))); |
|
| 30 | 2 | } |
|
| 31 | 4 | } |
|
| 32 | 4 | } |
|
| 33 | } |
||
| 34 |