ExceptionRethrowListener   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A onKernelException() 0 10 2
1
<?php
2
3
namespace Knp\RadBundle\EventListener;
4
5
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
6
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
7
8
class ExceptionRethrowListener
9
{
10
    public function onKernelException(GetResponseForExceptionEvent $event)
11
    {
12
        $exception = $event->getException();
13
14
        if ($exception instanceof HttpExceptionInterface) {
15
            return;
16
        }
17
18
        throw $exception;
19
    }
20
}
21