Просмотр исходного кода

Improve documentation and style.

pinlu 3 лет назад
Родитель
Сommit
4da55e7e4b

+ 7 - 0
GoogleSignIn/Sources/GIDProfileDataFetcher/Implementations/Fakes/GIDFakeProfileDataFetcher.h

@@ -22,9 +22,16 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
+/// The block which provides the response for user info request.
+///
+/// @param profileData The `GIDProfileData` object returned if succeeded.
+/// @param error The error returned if failed.
 typedef void (^GIDProfileDataFetcherFakeResponseProvider)(GIDProfileData *_Nullable profileData,
                                                           NSError *_Nullable error);
 
+/// The block to set up the response value.
+///
+/// @param responseProvider The block which provides the response.
 typedef void (^GIDProfileDataFetcherTestBlock)(GIDProfileDataFetcherFakeResponseProvider
                                                responseProvider);
 

+ 3 - 3
GoogleSignIn/Sources/GIDProfileDataFetcher/Implementations/Fakes/GIDFakeProfileDataFetcher.m

@@ -22,15 +22,15 @@ NS_ASSUME_NONNULL_BEGIN
                            completion:(void (^)(GIDProfileData *_Nullable profileData,
                                                 NSError *_Nullable error))completion {
   NSAssert(self.testBlock != nil, @"Set the test block before invoking this method.");
-  self.testBlock(^(GIDProfileData *_Nullable profileData, NSError *_Nullable error){
-    completion(profileData,error);
+  self.testBlock(^(GIDProfileData *_Nullable profileData, NSError *_Nullable error) {
+    completion(profileData, error);
   });
 }
 
 - (nullable GIDProfileData*)fetchProfileDataWithIDToken:(OIDIDToken *)idToken {
   NSAssert(self.testBlock != nil, @"Set the test block before invoking this method.");
   __block GIDProfileData *profileDataToReturn;
-  self.testBlock(^(GIDProfileData *_Nullable profileData, NSError *_Nullable error){
+  self.testBlock(^(GIDProfileData *_Nullable profileData, NSError *_Nullable error) {
     profileDataToReturn = profileData;
   });
   return profileDataToReturn;