Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 2.0625 |
Changes | 0 |
1 | <?php |
||
22 | public function __invoke( |
||
23 | 1 | CasInterface $cas, |
|
24 | 1 | TokenStorageInterface $tokenStorage |
|
25 | ) { |
||
26 | 1 | if (null !== $response = $cas->logout()) { |
|
27 | $tokenStorage->setToken(); |
||
28 | |||
29 | return new RedirectResponse($response->getHeaderLine('location')); |
||
30 | } |
||
31 | |||
32 | return new RedirectResponse('/'); |
||
33 | } |
||
35 |