public function createUser($properties): UserRecord
    {
        $request = $properties instanceof Request\CreateUser
            ? $properties
            : Request\CreateUser::withProperties($properties);

        $response = $this->client->createUser($request);

        $uid = JSON::decode((string) $response->getBody(), true)['localId'];

        return $this->getUser($uid);
    }
public function createUser($properties): UserRecord
    {
        $request = $properties instanceof Request\CreateUser
            ? $properties
            : Request\CreateUser::withProperties($properties);

        $response = $this->client->createUser($request);

        $uid = JSON::decode((string) $response->getBody(), true)['localId'];

        return $this->getUser($uid);
    }
public function createUser ( $ properties ) : UserRecord { $ request = $ properties instanceof Request \ CreateUser ? $ properties : Request \ CreateUser :: withProperties ( $ properties ) ; $ response = $ this -> client -> createUser ( $ request ) ; $ uid = JSON :: decode ( ( string ) $ response -> getBody ( ) , true ) [ 'localId' ] ; return $ this -> getUser ( $ uid ) ; }
Creates a new user with the provided properties.

@param array|Request\CreateUser $properties

@throws InvalidArgumentException if invalid properties have been provided

@return UserRecord
Creates a new user with the provided properties .