private function getCurrentData(int $limitLevels = 0)
    {
        $data = $this->currentData;
        $path = \array_slice($this->currentPath, 0, \count($this->currentPath) - $limitLevels);
        foreach ($path as $key) {
            if (!\array_key_exists($key, $data)) {
                throw new \LogicException(sprintf('Could not find the key "%s" from the current path "%s" in data "%s"', $key, implode(', ', $path), var_export($this->currentData, true)));
            }

            $data = $data[$key];
        }

        return $data;
    }
private function getCurrentData(int $limitLevels = 0)
    {
        $data = $this->currentData;
        $path = \array_slice($this->currentPath, 0, \count($this->currentPath) - $limitLevels);
        foreach ($path as $key) {
            if (!\array_key_exists($key, $data)) {
                throw new \LogicException(sprintf('Could not find the key "%s" from the current path "%s" in data "%s"', $key, implode(', ', $path), var_export($this->currentData, true)));
            }

            $data = $data[$key];
        }

        return $data;
    }
private function getCurrentData ( int $ limitLevels = 0 ) { $ data = $ this -> currentData ; $ path = \ array_slice ( $ this -> currentPath , 0 , \ count ( $ this -> currentPath ) - $ limitLevels ) ; foreach ( $ path as $ key ) { if ( ! \ array_key_exists ( $ key , $ data ) ) { throw new \ LogicException ( sprintf ( 'Could not find the key "%s" from the current path "%s" in data "%s"' , $ key , implode ( ', ' , $ path ) , var_export ( $ this -> currentData , true ) ) ) ; } $ data = $ data [ $ key ] ; } return $ data ; }
Returns the value in the current data that is currently
being looked at.

This could fail if the currentPath is for new data.

@param int $limitLevels If set to 1, the data 1 level up will be returned

@return mixed
Returns the value in the current data that is currently being looked at .