public function setExclude(string $pattern, string $flags = null): self
    {
        if (null === $flags) {
            return $this->setParam('exclude', $pattern);
        }

        return $this->setParam('exclude', [
            'pattern' => $pattern,
            'flags' => $flags,
        ]);
    }