| Conditions | 5 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | 22 | public function process(ContainerBuilder $container) |
|
| 11 | { |
||
| 12 | 22 | if (!$container->hasDefinition('twig.runtime_loader') |
|
| 13 | 22 | || !class_exists($container->getParameter('jms_serializer.twig_runtime_extension.class')) |
|
| 14 | 2 | || !interface_exists('Twig_RuntimeLoaderInterface') |
|
| 15 | 1 | || !class_exists($container->getParameter('jms_serializer.twig_runtime_extension_helper.class')) |
|
| 16 | 22 | ) { |
|
| 17 | 21 | $container->removeDefinition('jms_serializer.twig_extension.serializer_runtime_helper'); |
|
| 18 | 21 | return; |
|
| 19 | } |
||
| 20 | |||
| 21 | 1 | $def = $container->getDefinition('jms_serializer.twig_extension.serializer'); |
|
| 22 | 1 | $def->setClass('%jms_serializer.twig_runtime_extension.class%'); |
|
| 23 | 1 | $def->setArguments(array()); |
|
| 24 | 1 | } |
|
| 25 | } |
||
| 26 |