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'];
        }
    }
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'];
        }
    }
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' ] ; } }
Validates and sets the port property

@param string[] $locationParts
Validates and sets the port property