Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3.0123 |
Changes | 0 |
1 | <?php |
||
27 | 22 | public function process(ContainerBuilder $container) |
|
28 | { |
||
29 | 22 | if ($container->has('jms_serializer.handler_registry')) { |
|
30 | // the public alias prevents the handler registry definition from being removed |
||
31 | 6 | $container->setAlias('fos_rest.serializer.jms_handler_registry', new Alias('jms_serializer.handler_registry', true)); |
|
32 | |||
33 | 6 | return; |
|
34 | } |
||
35 | |||
36 | 16 | if ($container->hasDefinition('fos_rest.serializer.exception_normalizer.jms')) { |
|
37 | $container->removeDefinition('fos_rest.serializer.exception_normalizer.jms'); |
||
38 | } |
||
39 | |||
40 | 16 | $container->removeDefinition('fos_rest.serializer.handler_registry'); |
|
41 | 16 | $container->getParameterBag()->remove('jms_serializer.form_error_handler.class'); |
|
42 | 16 | } |
|
43 | } |
||
44 |