public function whenPostCategorized(PostCategorized $event)
 {
     $post = $this->posts->find($event->postId());
     $this->posts->save(new PostList($post->id(), $post->authorId(), $post->title(), $post->content(), $event->type(), $post->publishedAt()));
 }
 public function applyPostCategorized(PostCategorized $event)
 {
     $events->type = $event->type();
 }