| Conditions | 8 |
| Paths | 4 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 8.1867 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | 2 | public function process(ContainerBuilder $container): void |
|
| 29 | { |
||
| 30 | 2 | 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 | 1 | if ($container->has('fos_rest.view_response_listener') && isset($container->getParameter('kernel.bundles')['SensioFrameworkExtraBundle'])) { |
|
| 35 | 1 | 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 | } |
||
| 40 | } |
||
| 41 |