private static function obfuscateUri($uri)
    {
        $userInfo = $uri->getUserInfo();

        if (false !== ($pos = strpos($userInfo, ':'))) {
            return $uri->withUserInfo(substr($userInfo, 0, $pos), '***');
        }

        return $uri;
    }
private static function obfuscateUri($uri)
    {
        $userInfo = $uri->getUserInfo();

        if (false !== ($pos = strpos($userInfo, ':'))) {
            return $uri->withUserInfo(substr($userInfo, 0, $pos), '***');
        }

        return $uri;
    }
private static function obfuscateUri ( $ uri ) { $ userInfo = $ uri -> getUserInfo ( ) ; if ( false !== ( $ pos = strpos ( $ userInfo , ':' ) ) ) { return $ uri -> withUserInfo ( substr ( $ userInfo , 0 , $ pos ) , '***' ) ; } return $ uri ; }
Obfuscates URI if there is an username and a password present

@param UriInterface $uri

@return UriInterface
Obfuscates URI if there is an username and a password present