Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
16 | 2 | public function __invoke( |
|
17 | CasInterface $cas, |
||
18 | TokenStorageInterface $tokenStorage |
||
19 | ): RedirectResponse { |
||
20 | 2 | if (null !== $response = $cas->logout()) { |
|
21 | 1 | $tokenStorage->setToken(); |
|
22 | |||
23 | 1 | return new RedirectResponse($response->getHeaderLine('location')); |
|
24 | } |
||
25 | |||
26 | 1 | return new RedirectResponse('/'); |
|
27 | } |
||
29 |