/** * @param Comment $comment * @return array */ private function getCommentData(Comment $comment) { $data = ['attachments' => $comment->getAttachments(), 'content' => $comment->getContent(), 'created_at' => $comment->getCreatedAt(), 'updated_at' => $comment->getUpdatedAt(), 'id' => $comment->getId(), 'private' => $comment->isPrivate(), 'ticket' => $comment->getTicketId(), 'author' => $this->userService->fetchUserDetails($comment->getAuthor())]; return $data; }