public function withSeparator(string $separator): self
    {
        if ($separator === $this->separator) {
            return $this;
        }

        $clone = clone $this;
        $clone->separator = $this->filterSeparator($separator);

        return $clone;
    }
public function withSeparator(string $separator): self
    {
        if ($separator === $this->separator) {
            return $this;
        }

        $clone = clone $this;
        $clone->separator = $this->filterSeparator($separator);

        return $clone;
    }
public function withSeparator ( string $ separator ) : self { if ( $ separator === $ this -> separator ) { return $ this ; } $ clone = clone $ this ; $ clone -> separator = $ this -> filterSeparator ( $ separator ) ; return $ clone ; }
Returns an instance with a different separator.

This method MUST retain the state of the current instance, and return
an instance that contains the query component with a different separator
Returns an instance with a different separator .