src/Command/Model/EventSourcedAggregate.php
protected function apply(DomainEventMessageInterface $domainEventMessage): EventSourcedAggregate
    {
        $this->getMethod($domainEventMessage, 'on')($domainEventMessage->getPayload());

        return $this;
    }
protected function apply(DomainEventMessageInterface $domainEventMessage): EventSourcedAggregate
    {
        $this->getMethod($domainEventMessage, 'on')($domainEventMessage->getPayload());

        return $this;
    }
Apply domain event message to aggregate.

@param DomainEventMessageInterface $domainEventMessage
@return EventSourcedAggregate
@throws MethodNotFound