/** * @param Todo $entity */ public function run(EntityInterface $entity) { assert($entity instanceof Todo); $entity->setStatus(new TodoStatus()); $this->repository->add($entity); $this->entityManager->flush(); }
/** * @param Todo $entity */ public function run(EntityInterface $entity) { assert($entity instanceof Todo); $entity->setStatus(new TodoStatus()); $this->repository->add($entity); $this->entityManager->flush(); }