repo->ofId($cmd->id); // Delete the option from the repository $this->repo->remove($option); // Dispatch the option deleted event $event = new OptionDeletedEvent($option); $this->dispatcher->dispatch($event); } }