public function valid(): bool
    {
        if ($this->getCurrentElement() !== null && $this->getCurrentElement()->getValue() !== self::DONE && $this->getCurrentElement()->getOffset() !== -1) {
            return true;
        }
        return false;
    }
public function valid(): bool
    {
        if ($this->getCurrentElement() !== null && $this->getCurrentElement()->getValue() !== self::DONE && $this->getCurrentElement()->getOffset() !== -1) {
            return true;
        }
        return false;
    }
public function valid ( ) : bool { if ( $ this -> getCurrentElement ( ) !== null && $ this -> getCurrentElement ( ) -> getValue ( ) !== self :: DONE && $ this -> getCurrentElement ( ) -> getOffset ( ) !== - 1 ) { return true ; } return false ; }
Returns true, if the current element is not the end of the iterator

@return boolean True if the iterator has not reached it's end
Returns true if the current element is not the end of the iterator