protected function parse(string $key): array
    {
        if (strpos($key, '(') === false && strpos($key, ')') === false) {
            return ['field' => trim($key), 'operator' => ''];
        }

        if (!preg_match(static::REGEXP, $key, $matches)) {
            throw new InvalidFilterException("Invalid filter item '$key': Bad use of parentheses");
        }

        return array_only($matches, ['field', 'operator']) + ['operator' => ''];
    }