Example #1
0
 /**
  * @param MarkItemDone $command
  */
 public function handleMarkItemDone(MarkItemDone $command)
 {
     /* @var $item ToDoItem */
     $item = $this->repository->findById($command->getIdentity());
     $item->markDone($command);
     $this->repository->store($item);
 }
Example #2
0
 /**
  * @param MarkItemDone $command
  */
 public function markDone(MarkItemDone $command)
 {
     $this->applyChange(new ToDoItemDone($command->getIdentity()));
 }