| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | public function userAction() : JsonResponse |
||
| 37 | { |
||
| 38 | if (!$this->authorizationChecker->isGranted(AuthenticatedVoter::IS_AUTHENTICATED_FULLY)) { |
||
| 39 | throw new AccessDeniedException('This request requires authentication'); |
||
| 40 | } |
||
| 41 | |||
| 42 | return new JsonResponse(['userId' => $this->tokenStorage->getToken()->getUser()->id]); |
||
| 43 | } |
||
| 44 | } |
||
| 45 |