private function getArrayKey($key)
    {
        $data = $this->__toArray();

        $cases = [
            $key,
            $this->snakeCase($key),
            lower($this->snakeCase($key)),
            $this->camelCase($key),
            $this->kebabCase($key),
            lower($this->kebabCase($key)),
            $this->stringCase($key),
            lower($this->stringCase($key)),
            lower($key),
        ];

        $data = $this->filter(function ($value, $key) use ($cases) {
            return array_search($key, $cases) !== false ||
                array_search(lower($key), $cases) !== false;
        })
            ->keys()
            ->first();

        return is_string($data) ? $data : static::NOT_FOUND;
    }
private function getArrayKey($key)
    {
        $data = $this->__toArray();

        $cases = [
            $key,
            $this->snakeCase($key),
            lower($this->snakeCase($key)),
            $this->camelCase($key),
            $this->kebabCase($key),
            lower($this->kebabCase($key)),
            $this->stringCase($key),
            lower($this->stringCase($key)),
            lower($key),
        ];

        $data = $this->filter(function ($value, $key) use ($cases) {
            return array_search($key, $cases) !== false ||
                array_search(lower($key), $cases) !== false;
        })
            ->keys()
            ->first();

        return is_string($data) ? $data : static::NOT_FOUND;
    }
private function getArrayKey ( $ key ) { $ data = $ this -> __toArray ( ) ; $ cases = [ $ key , $ this -> snakeCase ( $ key ) , lower ( $ this -> snakeCase ( $ key ) ) , $ this -> camelCase ( $ key ) , $ this -> kebabCase ( $ key ) , lower ( $ this -> kebabCase ( $ key ) ) , $ this -> stringCase ( $ key ) , lower ( $ this -> stringCase ( $ key ) ) , lower ( $ key ) , ] ; $ data = $ this -> filter ( function ( $ value , $ key ) use ( $ cases ) { return array_search ( $ key , $ cases ) !== false || array_search ( lower ( $ key ) , $ cases ) !== false ; } ) -> keys ( ) -> first ( ) ; return is_string ( $ data ) ? $ data : static :: NOT_FOUND ; }
Get an array as a key.

@param $key
@return mixed|string
Get an array as a key .