public function asStringWithNonDefaultPort(): string
    {
        if ($this->parsedUri->hasPort() && !$this->hasDefaultPort()) {
            return $this->asString();
        }

        return $this->asStringWithoutPort();
    }
public function asStringWithNonDefaultPort(): string
    {
        if ($this->parsedUri->hasPort() && !$this->hasDefaultPort()) {
            return $this->asString();
        }

        return $this->asStringWithoutPort();
    }
public function asStringWithNonDefaultPort ( ) : string { if ( $ this -> parsedUri -> hasPort ( ) && ! $ this -> hasDefaultPort ( ) ) { return $ this -> asString ( ) ; } return $ this -> asStringWithoutPort ( ) ; }
Returns uri as string containing the port if it is not the default port.

@return  string
Returns uri as string containing the port if it is not the default port .