public function addConnection(string $name = null, Connection $connection = null): self
    {
        if (is_null($name)) {
            $this->defaultConnection = $connection;
        } else {
            $this->registry[$name] = $connection;
        }

        return $this;
    }