public function withPort(int $port = null): Uri
    {
        if ($port === $this->port) {
            return clone $this;
        }

        $this->validatePort($port);

        $new = clone $this;

        $new->port = $port;

        return $new;
    }