src/Controller/UserRESTController.php
/**
     * Controller method used for fetching resource via HTTP GET method
     *
     * @param string $id
     *
     * @return JsonResponse
     *
     * @throws \App\Exceptions\EntityNotFoundException
     * @Route(path="api/v1/user/{id}", methods={"GET"})
     */
Controller method used for fetching resource via HTTP GET method
@param string $id




Controller method used for fetching resource via HTTP GET method @param string $id
public function fetch(string $id): JsonResponse
    {
        return new JsonResponse(
            ApiHelper::prepareResponse(
                true,
                $this->serializer->normalize(
                    $this->userService->fetchUser($id),
                    'json'
                )
            ),
            Response::HTTP_OK
        );
    }
public function fetch ( string $ id ) : JsonResponse { return new JsonResponse ( ApiHelper :: prepareResponse ( true , $ this -> serializer -> normalize ( $ this -> userService -> fetchUser ( $ id ) , 'json' ) ) , Response :: HTTP_OK ) ; }
Controller method used for fetching resource via HTTP GET method
 @param string $id
Controller method used for fetching resource via HTTP GET method @param string $id