@param string $key
@param array  $data

@return array|mixed
773360
protected function getLexemes(string $key, array $data)
    {
        $syntax = $this->tryLoad($key);

        if (empty($this->data[$key]))
        {
            $syntax = $this->syntax($key, $data);
            $this->syntax2Array($key, $syntax);
        }

        return $syntax;
    }
294470
public function hmSet($key, array $data) {
        $array = ['hmset', $key];

        foreach ($data as $dataKey => $value) {
            $array[] = $dataKey;
            $array[] = $value;
        }

        return $this->send($array);
    }
399120
private function httpBuildMultiQuery(array $data, $key = null)
    {
            $query = array();

            if (empty($data)) {
                return $key . '=';
            }
            $isArrayAssoc = $this->isArrayAssoc($data);
            // build
            foreach ($data as $k => $value) {
                if (is_string($value) || is_numeric($value)) {
                    $brackets = $isArrayAssoc ? '[' . $k . ']' : '[]';
                    $query[] = urlencode(is_null($key) ? $k : $key . $brackets) . '=' . rawurlencode($value);
                } elseif (is_array($value)) {
                    $nested = is_null($key) ? $k : $key . '[' . $k . ']';
                    $query[] = $this->httpBuildMultiQuery($value, $nested);
                }
            }

            return implode('&', $query);
        }
784498
public function flattenArrayByKey(array $data, $key)
    {
        $array = [];
        foreach ($data as $value) {
            if (is_array($value) && isset($value[$key])) {
                $array[] = $value[$key];
            }
        }

        return $array;
    }
604231
public function get($key)
        {
            if (Arrays::is($key)) {
                $result = [];

                foreach($key as $column) {
                    $result[$column] = isset($this->_data[$column]) ? $this->_data[$column] : null;
                }

                return $result;
            } else {
                return isset($this->_data[$key]) ? $this->_data[$key] : null;
            }
        }
1139775
private function _get( $key, $data, $default ) {
		if ( ! is_array( $data ) || ! array_key_exists( 'value', $data ) ) {
			return $default;
		}
		if ( $this->_expired( $data ) ) {
			$this->_delete( $key );

			return $default;
		}

		return $data['value'];
	}
1245045
public function getDataAsArray($key = 'data')
    {
        $data = $this->getData();

        if (null === $data) {
            return array();
        }

        if (!is_array($data)) {
            $data = array($key => $data);
        }

        return $data;
    }
673775
public function getKey($key)
	{
		return isset($this->data[$key]) ? $this->data[$key] : null;
	}
1271233
public function getFromArray(string $key, array $data, string $default = null)
    {
        $value = $default;

        if (\array_key_exists($key, $data)) {
            $value = $data[$key];
        }

        return $value;
    }
395138
public function dump($key, array $data)
    {
        $data = Hash::flatten($data);
        array_walk($data, [$this, '_persist'], $key);
        array_filter($data);

        return (bool)$data;
    }
92867
public function get($key = null)
    {
        if (Arr::key($key, $this->_data)) {
            return $this->_data[$key];
        }

        return $this->_data;
    }
1284735
public static function first(array $data, ?string $key = null)
    {
        if (count($data) === 0) {
            return null;
        }
        reset($data);
        $element = current($data);
        if ($key !== null && is_array($element) && isset($element[$key])) {
            return $element[$key];
        }
        return $element;
    }
154559
static function createFromData($key, array $data)
    {
        return new self(
            $key,
            isset($data[self::TYPE_CALL]) ? $data[self::TYPE_CALL] : null,
            isset($data[self::TYPE_TIME]) ? $data[self::TYPE_TIME] : null,
            isset($data[self::TYPE_CPU]) ? $data[self::TYPE_CPU] : null,
            isset($data[self::TYPE_MEMORY_USAGE]) ? $data[self::TYPE_MEMORY_USAGE] : null,
            isset($data[self::TYPE_PEAK_MEMORY_USAGE]) ? $data[self::TYPE_PEAK_MEMORY_USAGE] : null
        );
    }
972765
protected function checkKeyExists($data, $key)
    {
        if (!$data->has($key)) {
            $this->output->writeln("<error>The key $key does not exist.");

            return false;
        }

        return true;
    }
24881
public static function createFromArray($key, array $data = [], ApiDefinition $apiDefinition = null)
    {
        $securityScheme = new static($key === 'null' ? null : $key);

        if (isset($data['description'])) {
            $securityScheme->setDescription($data['description']);
        }

        if (isset($data['type'])) {
            $securityScheme->setType($data['type']);
        }

        if (isset($data['describedBy'])) {
            $securityScheme->setDescribedBy(
                SecuritySchemeDescribedBy::createFromArray('describedBy', $data['describedBy'])
            );
        }

        if (isset($data['settings'])) {
            $securityScheme->setSettings($data['settings']);
        }

        return $securityScheme;
    }
1026508
public static function moveKeyToEnd(array $data, $key)
    {
        if (array_key_exists($key, $data)) {
            $data += array_splice($data, array_search($key, array_keys($data)), 1);
        }

        return $data;
    }
669370
public static function has(array $data, $key)
	{
		if (!is_array($data)) {
			return false;
		}

		if (!array_key_exists($key,$data)) {
			return false;
		}

		return true;
	}