mageekguy\atoum\php\tokenizer\iterator::end PHP Method

end() public method

public end ( )
    public function end()
    {
        if ($this->size > 0) {
            end($this->values);
            $currentValue = current($this->values);
            $valid = true;
            while ($currentValue->end()->valid() == false && $valid === true) {
                prev($this->values);
                if (($valid = $this->valid()) === true) {
                    $currentValue = current($this->values);
                }
            }
            $this->key = $this->size - 1;
            if ($valid === true) {
                while (in_array($this->current(), $this->skipedValues) === true && $this->valid() === true) {
                    $this->prev();
                }
            }
        }
        return $this;
    }