Kraken\Util\Buffer\BufferIterator::valid PHP Method

valid() public method

Determine if the iterator is valid.
public valid ( ) : boolean
return boolean
    public function valid()
    {
        return isset($this->buffer[$this->current]);
    }

Usage Example

 public function testApiRemove_ThrowsException_OnInvalidIterator()
 {
     $this->setExpectedException(OutOfBoundsException::class);
     for ($this->iterator->rewind(); $this->iterator->valid(); $this->iterator->next()) {
     }
     $this->iterator->remove();
 }
All Usage Examples Of Kraken\Util\Buffer\BufferIterator::valid