Conditions | 8 |
Paths | 4 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 8 |
Changes | 0 |
1 | <?php |
||
28 | 15 | public function process(ContainerBuilder $container): void |
|
29 | { |
||
30 | 15 | if ($container->has('fos_rest.converter.request_body') && !($container->has('sensio_framework_extra.converter.listener') || $container->has(ParamConverterListener::class))) { |
|
31 | 1 | throw new \RuntimeException('You need to enable the parameter converter listeners in SensioFrameworkExtraBundle when using the FOSRestBundle RequestBodyParamConverter'); |
|
32 | } |
||
33 | |||
34 | 14 | if ($container->has('fos_rest.view_response_listener') && isset($container->getParameter('kernel.bundles')['SensioFrameworkExtraBundle'])) { |
|
35 | 2 | if (!($container->has('sensio_framework_extra.view.listener') || $container->has(TemplateListener::class))) { |
|
36 | 1 | throw new \RuntimeException('You must enable the SensioFrameworkExtraBundle view annotations to use the ViewResponseListener. Did you forget to install and enable the TwigBundle?'); |
|
37 | } |
||
38 | } |
||
39 | 13 | } |
|
40 | } |
||
41 |