public function listAction(int $postId) : JsonResponse { $comments = $this->commentRepository->getCommentsByPostId($postId); $dtoComments = $this->commentsMapper->transformCollection($comments); return $this->responseFactory->makeResponse($dtoComments); }