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