src/Domain/Model/EventCollection.php
public function record(EventMessage $message): void
    {
        $eventRecord = new EventRecord(
            $message,
            $this->aggregateId,
            $this->aggregateType,
            $this->nextSequence()
        );
        $this->lastSequence = $eventRecord->sequenceNumber();
        $this->eventRecords->add($eventRecord);
    }
public function record(EventMessage $message): void
    {
        $eventRecord = new EventRecord(
            $message,
            $this->aggregateId,
            $this->aggregateType,
            $this->nextSequence()
        );
        $this->lastSequence = $eventRecord->sequenceNumber();
        $this->eventRecords->add($eventRecord);
    }
public function record ( EventMessage $ message ) : void { $ eventRecord = new EventRecord ( $ message , $ this -> aggregateId , $ this -> aggregateType , $ this -> nextSequence ( ) ) ; $ this -> lastSequence = $ eventRecord -> sequenceNumber ( ) ; $ this -> eventRecords -> add ( $ eventRecord ) ; }
Records an event message

@param EventMessage $message The event message

@return void
Records an event message