| Total Complexity | 3 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | final class ExceptionSubscriber implements EventSubscriberInterface |
||
| 23 | { |
||
| 24 | public function onKernelException(GetResponseForExceptionEvent $event) |
||
| 25 | { |
||
| 26 | $exception = $event->getException(); |
||
| 27 | |||
| 28 | if (!($exception instanceof SkipControllerException)) { |
||
| 29 | return; |
||
| 30 | } |
||
| 31 | |||
| 32 | $event->allowCustomResponseCode(); |
||
| 33 | $event->setResponse($exception->getResponse()); |
||
| 34 | } |
||
| 35 | |||
| 36 | public static function getSubscribedEvents() |
||
| 40 | ]; |
||
| 41 | } |
||
| 43 |