public function getLastSequenceNumber()
    {
        if (count($this->events) === 0) {
            return $this->lastCommittedSequenceNumber;
        }
        if ($this->lastSequenceNumber === null) {
            $event = end($this->events);
            $this->lastSequenceNumber = $event->getSequenceNumber();
        }
        return $this->lastSequenceNumber;
    }
public function getLastSequenceNumber()
    {
        if (count($this->events) === 0) {
            return $this->lastCommittedSequenceNumber;
        }
        if ($this->lastSequenceNumber === null) {
            $event = end($this->events);
            $this->lastSequenceNumber = $event->getSequenceNumber();
        }
        return $this->lastSequenceNumber;
    }
public function getLastSequenceNumber ( ) { if ( count ( $ this -> events ) === 0 ) { return $ this -> lastCommittedSequenceNumber ; } if ( $ this -> lastSequenceNumber === null ) { $ event = end ( $ this -> events ) ; $ this -> lastSequenceNumber = $ event -> getSequenceNumber ( ) ; } return $ this -> lastSequenceNumber ; }
Returns the sequence number of the last committed event, or null if no events have been committed.

@return int
Returns the sequence number of the last committed event or null if no events have been committed .