| Conditions | 4 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 4.0058 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 14 | 2 | public function process(ContainerBuilder $container) |
|
| 15 | { |
||
| 16 | 2 | if (!$container->hasDefinition('majora.serializer')) { |
|
| 17 | return; |
||
| 18 | } |
||
| 19 | |||
| 20 | 2 | $serializer = $container->getDefinition('majora.serializer'); |
|
| 21 | 2 | $handlersDef = $container->findTaggedServiceIds('majora.serialization_handler'); |
|
| 22 | |||
| 23 | 2 | foreach ($handlersDef as $id => $attributes) { |
|
| 24 | 2 | foreach ($attributes as $attribute) { |
|
| 25 | 2 | $serializer->addMethodCall('registerFormatHandler', array( |
|
| 26 | 2 | $attribute['format'], |
|
| 27 | 2 | new Reference($id) |
|
| 28 | 1 | )); |
|
| 29 | 1 | } |
|
| 30 | 1 | } |
|
| 31 | 2 | } |
|
| 32 | } |
||
| 33 |