private function parsePort(array $locationParts): void
    {
        if (! isset($locationParts['port'])) {
            if ($this->getScheme() === 'git+http') {
                $this->port = 80;
            } elseif ($this->getScheme() === 'git+https') {
                $this->port = 443;
            } else {
                $this->port = 0;
            }
        } else {
            $this->port = (int) $locationParts['port'];
        }
    }