public function unset(string $key)
    {
        if (array_key_exists($key, $this->input)) {
            unset($this->input[$key]);
            unset($this->cache[$key]);
        }

        $item = &$this->input;

        foreach (explode('.', $key) as $segment) {
            if (! isset($item[$segment])) {
                return;
            }
            if (! is_array($item[$segment])) {
                unset($item[$segment]);
                break;
            }
            $item = &$item[$segment];
        }

        unset($this->cache[$key]);
    }