src/Path.php
public function valid()
    {
        if (!isset($this->keys[$this->index])) {
            return false;
        }

        $hasContent = $this->hasContentForKey($this->keys[$this->index], $this->content);

        if (!$hasContent && $this->throwOnNotReachable) {
            $message = sprintf('No current content contains new content at a key of "%s".', $this->keys[$this->index]);
            throw new PathNotReachableException($this->keys[$this->index], $message);
        }

        return $hasContent;
    }
public function valid()
    {
        if (!isset($this->keys[$this->index])) {
            return false;
        }

        $hasContent = $this->hasContentForKey($this->keys[$this->index], $this->content);

        if (!$hasContent && $this->throwOnNotReachable) {
            $message = sprintf('No current content contains new content at a key of "%s".', $this->keys[$this->index]);
            throw new PathNotReachableException($this->keys[$this->index], $message);
        }

        return $hasContent;
    }
public function valid ( ) { if ( ! isset ( $ this -> keys [ $ this -> index ] ) ) { return false ; } $ hasContent = $ this -> hasContentForKey ( $ this -> keys [ $ this -> index ] , $ this -> content ) ; if ( ! $ hasContent && $ this -> throwOnNotReachable ) { $ message = sprintf ( 'No current content contains new content at a key of "%s".' , $ this -> keys [ $ this -> index ] ) ; throw new PathNotReachableException ( $ this -> keys [ $ this -> index ] , $ message ) ; } return $ hasContent ; }
Returns true if content exists for the current key.

@return bool True if content exists for the current key.
Returns true if content exists for the current key .