public static function isDefaultPort(UriInterface $uri): bool
    {
        return $uri->getPort() === null
            || (isset(self::$defaultPorts[$uri->getScheme()]) && $uri->getPort() === self::$defaultPorts[$uri->getScheme()]);
    }
public static function isDefaultPort(UriInterface $uri): bool
    {
        return $uri->getPort() === null
            || (isset(self::$defaultPorts[$uri->getScheme()]) && $uri->getPort() === self::$defaultPorts[$uri->getScheme()]);
    }
public static function isDefaultPort ( UriInterface $ uri ) : bool { return $ uri -> getPort ( ) === null || ( isset ( self :: $ defaultPorts [ $ uri -> getScheme ( ) ] ) && $ uri -> getPort ( ) === self :: $ defaultPorts [ $ uri -> getScheme ( ) ] ) ; }
Whether the URI has the default port of the current scheme.

`Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used
independently of the implementation.

@param UriInterface $uri

@return bool
Whether the URI has the default port of the current scheme .