/** * Find comment by id * * @param $id * @return mixed * @throws NotFoundException */ public function findByCommentId($id) { $comment = $this->comment->findById($id); if (!$comment) { throw new NotFoundException('Comment not found !'); } return $comment; }