Conditions | 6 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
24 | 5 | public function onKernelView(GetResponseForControllerResultEvent $event) |
|
25 | { |
||
26 | 5 | $result = $event->getControllerResult(); |
|
27 | |||
28 | 5 | if (null === $result && true === $this->allowNull) { |
|
29 | 1 | $event->setResponse($this->createResponse()); |
|
30 | |||
31 | 1 | return; |
|
32 | } |
||
33 | |||
34 | 4 | if (!$result instanceof View) { |
|
35 | 1 | return; |
|
36 | } |
||
37 | |||
38 | 3 | if (null === $result->getData() && null === $result->getTemplate()) { |
|
39 | 1 | $event->setResponse($this->createResponse($result->getHeaders())); |
|
40 | 1 | } |
|
41 | 3 | } |
|
42 | |||
53 |