/** * @param Post $post * @return array */ public function format(Post $post) { return ["id" => $post->getId(), "thread_id" => $post->getThread()->getId(), "content" => $post->getContent(), "created_at" => $post->getCreatedAt()->getTimestamp()]; }