/** * @param DomainEventInterface $event */ protected function recordApplyAndPublishEvent(DomainEventInterface $event) { Validator::assert($event); $this->version()->increment(VersionIncrementType::PATCH()); $event->setVersion($this->version()->patch()); $this->recordEvent($event); $this->applyEvent($event); $this->publishEvent($event); }
/** * {@inheritdoc} */ public function handle($message, callable $next) { Validator::assert($message); $next($message); }