| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2 |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 14 | 2 | public function onKernelView(GetResponseForControllerResultEvent $event) |
|
| 15 | { |
||
| 16 | 2 | $result = $event->getControllerResult(); |
|
| 17 | |||
| 18 | 2 | if (!$result instanceof Forward) { |
|
| 19 | 1 | return; |
|
| 20 | } |
||
| 21 | |||
| 22 | 1 | $parameters = $result->getParameters(); |
|
| 23 | 1 | $parameters['_controller'] = $result->getController(); |
|
| 24 | 1 | $subRequest = $event->getRequest()->duplicate(null, null, $parameters); |
|
| 25 | 1 | $response = $event->getKernel()->handle($subRequest, HttpKernelInterface::SUB_REQUEST); |
|
| 26 | 1 | $event->setResponse($response); |
|
| 27 | 1 | } |
|
| 28 | } |
||
| 29 |