Eloquent\Phony\Event\EventSequence::lastEvent PHP Method

lastEvent() public method

Get the last event.
public lastEvent ( ) : Eloquent\Phony\Event\Event
return Eloquent\Phony\Event\Event The event.
    public function lastEvent()
    {
        if ($count = count($this->events)) {
            return $this->events[$count - 1];
        }
        throw new UndefinedEventException(0);
    }