src/AbstractUrl.php
protected static function formatHostComponent(array $components)
    {
        if (strpos($components['host'], '@')) {
            list($auth, $components['host']) = explode('@', $components['host']);
            $components['user'] = $auth;
            $components['pass'] = null;
            if (false !== strpos($auth, ':')) {
                list($components['user'], $components['pass']) = explode(':', $auth);
            }
        }

        return $components;
    }
protected static function formatHostComponent(array $components)
    {
        if (strpos($components['host'], '@')) {
            list($auth, $components['host']) = explode('@', $components['host']);
            $components['user'] = $auth;
            $components['pass'] = null;
            if (false !== strpos($auth, ':')) {
                list($components['user'], $components['pass']) = explode(':', $auth);
            }
        }

        return $components;
    }
protected static function formatHostComponent ( array $ components ) { if ( strpos ( $ components [ 'host' ] , '@' ) ) { list ( $ auth , $ components [ 'host' ] ) = explode ( '@' , $ components [ 'host' ] ) ; $ components [ 'user' ] = $ auth ; $ components [ 'pass' ] = null ; if ( false !== strpos ( $ auth , ':' ) ) { list ( $ components [ 'user' ] , $ components [ 'pass' ] ) = explode ( ':' , $ auth ) ; } } return $ components ; }
Reformat the component according to the host content

@param array $components the result from parse_url

@return array
Reformat the component according to the host content