public function port($raw = false)
    {
        $port = $this->port;
        // If not in raw mode and port is not set, figure it out from scheme.
        if (!$raw && $port === null) {
            if ($this->scheme === 'http') {
                $this->port = 80;
            } elseif ($this->scheme === 'https') {
                $this->port = 443;
            }
        }

        return $this->port;
    }
public function port($raw = false)
    {
        $port = $this->port;
        // If not in raw mode and port is not set, figure it out from scheme.
        if (!$raw && $port === null) {
            if ($this->scheme === 'http') {
                $this->port = 80;
            } elseif ($this->scheme === 'https') {
                $this->port = 443;
            }
        }

        return $this->port;
    }
public function port ( $ raw = false ) { $ port = $ this -> port ; // If not in raw mode and port is not set, figure it out from scheme. if ( ! $ raw && $ port === null ) { if ( $ this -> scheme === 'http' ) { $ this -> port = 80 ; } elseif ( $ this -> scheme === 'https' ) { $ this -> port = 443 ; } } return $ this -> port ; }
Return the port number if it can be figured out

@param bool $raw
@return int|null
Return the port number if it can be figured out