/**
  * Denormalize MovieWasRescheduled event.
  *
  * @param MovieWasRescheduled              $event
  * @param MovieThatWereScheduledRepository $repository
  *
  * @return MovieThatWereScheduled
  */
 public function handle(MovieWasRescheduled $event, MovieThatWereScheduledRepository $repository)
 {
     /** @var MovieThatWereScheduled $model */
     $model = $repository->findById((string) $event->id);
     $model->reschedule($event->schedule->format('Y-m-d H:i:s'));
     $repository->save($model);
     return $model;
 }
 /**
  * Denormalize MovieWasScheduled event.
  *
  * @param MovieWasScheduled                $event
  * @param MovieThatWereScheduledRepository $repository
  *
  * @return MovieThatWereScheduled
  */
 public function handle(MovieWasScheduled $event, MovieThatWereScheduledRepository $repository)
 {
     $model = new MovieThatWereScheduled($event->id->toString(), $event->name, $event->schedule->format('Y-m-d H:i:s'), $event->price);
     $repository->save($model);
     return $model;
 }