src/Uri.php
protected function setUserInfo($user = '', $password = '')
    {
        $this->uriString = null;

        if (! $user) {
            $this->userInfo = '';

            return $this;
        }
        $this->userInfo = rtrim($user, '@');

        if ($password) {
            $this->userInfo .= ':' . $password;
        }

        return $this;
    }
protected function setUserInfo($user = '', $password = '')
    {
        $this->uriString = null;

        if (! $user) {
            $this->userInfo = '';

            return $this;
        }
        $this->userInfo = rtrim($user, '@');

        if ($password) {
            $this->userInfo .= ':' . $password;
        }

        return $this;
    }
protected function setUserInfo ( $ user = '' , $ password = '' ) { $ this -> uriString = null ; if ( ! $ user ) { $ this -> userInfo = '' ; return $ this ; } $ this -> userInfo = rtrim ( $ user , '@' ) ; if ( $ password ) { $ this -> userInfo .= ':' . $ password ; } return $ this ; }
Sets the provided user information to current instance.

@param string $user     The user name to use for authority
@param string $password The password associated with $user

@return Uri The current instance with the provided user information
Sets the provided user information to current instance .