src/Commands/Command.php
function parseResponse($data)
    {
        if (empty($data)) {
            return [];
        }

        if (isset($data[0]) && count($data[0]) === $this->getKeysCount()) {
            $items = array_combine($data[0], $data[1]);

            return array_filter($items, [$this, 'notNil']);
        }

        throw new Exception('Error when evaluate lua script. Response is: ' . json_encode($data));
    }
function parseResponse($data)
    {
        if (empty($data)) {
            return [];
        }

        if (isset($data[0]) && count($data[0]) === $this->getKeysCount()) {
            $items = array_combine($data[0], $data[1]);

            return array_filter($items, [$this, 'notNil']);
        }

        throw new Exception('Error when evaluate lua script. Response is: ' . json_encode($data));
    }
function parseResponse ( $ data ) { if ( empty ( $ data ) ) { return [ ] ; } if ( isset ( $ data [ 0 ] ) && count ( $ data [ 0 ] ) === $ this -> getKeysCount ( ) ) { $ items = array_combine ( $ data [ 0 ] , $ data [ 1 ] ) ; return array_filter ( $ items , [ $ this , 'notNil' ] ) ; } throw new Exception ( 'Error when evaluate lua script. Response is: ' . json_encode ( $ data ) ) ; }
Resolve data returned from "eval"

@param $data
@return mixed
@throws Exception
Resolve data returned from eval