Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
33 | public function __invoke(string $username, string $emailAddress, string $token): Response |
||
34 | { |
||
35 | try { |
||
36 | $this->emailAddressManager->confirmNewEmailAddress($username, $emailAddress, $token); |
||
37 | } catch (InvalidArgumentException $exception) { |
||
38 | return new Response(null, Response::HTTP_NOT_FOUND); |
||
39 | } catch (UnexpectedValueException $exception) { |
||
40 | return new Response(null, Response::HTTP_UNAUTHORIZED); |
||
41 | } |
||
42 | |||
43 | $response = new Response(null, Response::HTTP_OK); |
||
44 | $response->setCache([ |
||
45 | 'private' => true, |
||
46 | 's_maxage' => 0, |
||
47 | 'max_age' => 0, |
||
48 | ]); |
||
49 | |||
50 | return $response; |
||
51 | } |
||
53 |