protected function isStandardPort(): bool
    {
        if (! $this->scheme) {
            return $this->host && ! $this->port;
        }

        if (! $this->host || ! $this->port) {
            return true;
        }

        return (static::HTTP_SCHEME === $this->scheme && $this->port === static::HTTP_PORT)
            || (static::HTTPS_SCHEME === $this->scheme && $this->port === static::HTTPS_PORT);
    }