src/Domain/EventSourcedAggregateRoot.php
/**
     * Record domain event
     *
     * @param DomainEvent $domainEvent
     */
Record domain event
@param DomainEvent $domainEvent
Record domain event @param DomainEvent $domainEvent
protected function recordThat(DomainEvent $domainEvent): void
    {
        $this->lastRecordedEvents[] = $domainEvent;
        ++$this->version;
        $this->apply($domainEvent);
    }
protected function recordThat ( DomainEvent $ domainEvent ) : void { $ this -> lastRecordedEvents [ ] = $ domainEvent ; ++ $ this -> version ; $ this -> apply ( $ domainEvent ) ; }
Record domain event
 @param DomainEvent $domainEvent
Record domain event @param DomainEvent $domainEvent