public function setOption(string $key, $value): void
    {
        if (array_key_exists($key, $this->options)) {
            $this->options[$key] = $value;

            return;
        }

        throw new Exception('Invalid option key "' . $key . '".', Exception::INVALID_OPTION);
    }