protected function popCredentials(UrlContract $url)
    {
        if ($url->user && $url->password) {
            $this->user = $url->user;
            $this->password = $url->password;
            return $url->user('')->password('');
        }

        $this->user = '';
        $this->password = '';

        return $url;

    }
protected function popCredentials(UrlContract $url)
    {
        if ($url->user && $url->password) {
            $this->user = $url->user;
            $this->password = $url->password;
            return $url->user('')->password('');
        }

        $this->user = '';
        $this->password = '';

        return $url;

    }
protected function popCredentials ( UrlContract $ url ) { if ( $ url -> user && $ url -> password ) { $ this -> user = $ url -> user ; $ this -> password = $ url -> password ; return $ url -> user ( '' ) -> password ( '' ) ; } $ this -> user = '' ; $ this -> password = '' ; return $ url ; }
Remove the credentials from url and assign them to

@param UrlContract $url

@return UrlContract
Remove the credentials from url and assign them to