Conditions | 4 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | public function onKernelController(FilterControllerEvent $event) |
||
24 | { |
||
25 | $controller = $event->getController(); |
||
26 | |||
27 | /* |
||
28 | * $controller passed can be either a class or a Closure. |
||
29 | * This is not usual in Symfony but it may happen. |
||
30 | * If it is a class, it comes in array format |
||
31 | */ |
||
32 | if (!is_array($controller)) { |
||
33 | return; |
||
34 | } |
||
35 | |||
36 | if ($controller[0] instanceof AuthenticatedInterface) { |
||
37 | if (isset($_SESSION['phpCAS']['user'])) { |
||
38 | throw new AccessDeniedHttpException('Access forbidden.'); |
||
39 | } |
||
54 | } |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.