| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | public function __invoke(LogoutEvent $event): void |
||
| 35 | { |
||
| 36 | $this->storage->expireAll($event->getToken()->getUser()); |
||
| 37 | $response = $event->getResponse() ?? new Response(); |
||
| 38 | $response->headers->setCookie($this->cookieProvider->createCookie('x.x.x', null, 1)); |
||
| 39 | $response->headers->setCookie($this->mercureAuthorization->getClearAuthorizationCookie()); |
||
| 40 | $response->headers->remove('Location'); |
||
| 41 | $response->setStatusCode(Response::HTTP_OK)->setContent(''); |
||
| 42 | $event->setResponse($response); |
||
| 43 | } |
||
| 45 |