aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Marek Gilbert <mcg@google.com>2017-08-02 09:30:15 -0700
committerGravatar Marek Gilbert <mcg@google.com>2017-08-02 09:52:48 -0700
commite4af03818cacb91466af842d972280e84293977b (patch)
tree7a106280a927d4e17a4040b246941ffc852bd15b
parent8d55eb92a42217d4d3399d8cbb49e6e8a98d209f (diff)
Formatting updates based on the latest clang-format
clang-format version 5.0.0 (tags/google/stable/2017-06-22)
-rw-r--r--Example/Core/Tests/FIRAppTest.m5
-rw-r--r--Example/Shared/FIRSampleAppUtilities.m13
-rw-r--r--Firebase/Core/FIRApp.m24
-rw-r--r--Firebase/Core/FIRNetwork.m6
-rw-r--r--Firebase/Core/FIRNetworkURLSession.m35
-rw-r--r--Firebase/Core/FIROptions.m19
-rw-r--r--Firebase/Core/FIRReachabilityChecker.m5
-rw-r--r--Firebase/Core/FIRURLSchemeUtil.m5
-rw-r--r--Firebase/Core/Private/FIRLogger.h2
9 files changed, 60 insertions, 54 deletions
diff --git a/Example/Core/Tests/FIRAppTest.m b/Example/Core/Tests/FIRAppTest.m
index a4f6803..8ba64e2 100644
--- a/Example/Core/Tests/FIRAppTest.m
+++ b/Example/Core/Tests/FIRAppTest.m
@@ -313,8 +313,9 @@ NSString *const kFIRTestAppName2 = @"test-app-name-2";
getTokenCallbackWasCalled = YES;
}];
- XCTAssertFalse(passedRefreshValue, @"The value for the 'refresh' parameter wasn't passed to the "
- "'getTokenImplementation' block correctly.");
+ XCTAssertFalse(passedRefreshValue,
+ @"The value for the 'refresh' parameter wasn't passed to the "
+ "'getTokenImplementation' block correctly.");
}
- (void)testModifyingOptionsThrows {
diff --git a/Example/Shared/FIRSampleAppUtilities.m b/Example/Shared/FIRSampleAppUtilities.m
index 7a777d0..88fc9b0 100644
--- a/Example/Shared/FIRSampleAppUtilities.m
+++ b/Example/Shared/FIRSampleAppUtilities.m
@@ -30,12 +30,13 @@ NSString *const kDummyGoogleAppID = @"1:123:ios:123abc";
NSString *const kGithubRepoURLString = @"https://github.com/firebase/firebase-ios-sdk/";
// Alert contents
NSString *const kInvalidPlistAlertTitle = @"GoogleService-Info.plist";
-NSString *const kInvalidPlistAlertMessage = @"This sample app needs to be updated with a valid "
- @"GoogleService-Info.plist file in order to configure "
- @"Firebase.\n\n"
- @"Please update the app with a valid plist file, "
- @"following the instructions in the Firebase Github "
- @"repository at: %@";
+NSString *const kInvalidPlistAlertMessage =
+ @"This sample app needs to be updated with a valid "
+ @"GoogleService-Info.plist file in order to configure "
+ @"Firebase.\n\n"
+ @"Please update the app with a valid plist file, "
+ @"following the instructions in the Firebase Github "
+ @"repository at: %@";
@implementation FIRSampleAppUtilities
diff --git a/Firebase/Core/FIRApp.m b/Firebase/Core/FIRApp.m
index cdfb126..860bbd3 100644
--- a/Firebase/Core/FIRApp.m
+++ b/Firebase/Core/FIRApp.m
@@ -83,10 +83,11 @@ static FIRApp *sDefaultApp;
kFIRAppDiagnosticsErrorKey : [FIRApp errorForMissingOptions]
}];
[NSException raise:kFirebaseCoreErrorDomain
- format:@"`[FIRApp configure];` (`FirebaseApp.configure()` in Swift) could not find "
- @"a valid GoogleService-Info.plist in your project. Please download one "
- @"from %@.",
- kPlistURL];
+ format:
+ @"`[FIRApp configure];` (`FirebaseApp.configure()` in Swift) could not find "
+ @"a valid GoogleService-Info.plist in your project. Please download one "
+ @"from %@.",
+ kPlistURL];
}
[FIRApp configureDefaultAppWithOptions:options sendingNotifications:YES];
}
@@ -110,8 +111,9 @@ static FIRApp *sDefaultApp;
kFIRAppDiagnosticsErrorKey : [FIRApp errorForMissingOptions]
}];
[NSException raise:kFirebaseCoreErrorDomain
- format:@"Please check there is a valid "
- @"GoogleService-Info.plist in the project."];
+ format:
+ @"Please check there is a valid "
+ @"GoogleService-Info.plist in the project."];
}
[FIRApp configureDefaultAppWithOptions:options sendingNotifications:NO];
}
@@ -154,8 +156,9 @@ static FIRApp *sDefaultApp;
if (!((character >= 'a' && character <= 'z') || (character >= '0' && character <= '9') ||
character == '_' || character == '-')) {
[NSException raise:kFirebaseCoreErrorDomain
- format:@"App name should only contain Letters, "
- @"Numbers, Underscores, and Dashes."];
+ format:
+ @"App name should only contain Letters, "
+ @"Numbers, Underscores, and Dashes."];
}
}
@@ -254,8 +257,9 @@ static FIRApp *sDefaultApp;
}];
} else {
[NSException raise:kFirebaseCoreErrorDomain
- format:@"Configuration fails. It may be caused by an invalid GOOGLE_APP_ID in "
- @"GoogleService-Info.plist or set in the customized options."];
+ format:
+ @"Configuration fails. It may be caused by an invalid GOOGLE_APP_ID in "
+ @"GoogleService-Info.plist or set in the customized options."];
}
}
diff --git a/Firebase/Core/FIRNetwork.m b/Firebase/Core/FIRNetwork.m
index f1278ed..ff292fc 100644
--- a/Firebase/Core/FIRNetwork.m
+++ b/Firebase/Core/FIRNetwork.m
@@ -263,8 +263,8 @@ static NSString *const kFIRNetworkLogTag = @"Firebase/Network";
respondsToSelector:@selector(firNetwork_logWithLevel:messageCode:message:contexts:)] ||
![loggerDelegate
respondsToSelector:@selector(firNetwork_logWithLevel:messageCode:message:context:)] ||
- ![loggerDelegate
- respondsToSelector:@selector(firNetwork_logWithLevel:messageCode:message:)]) {
+ !
+ [loggerDelegate respondsToSelector:@selector(firNetwork_logWithLevel:messageCode:message:)]) {
FIRLogError(kFIRLoggerAnalytics,
[NSString stringWithFormat:@"I-NET%06ld", (long)kFIRNetworkMessageCodeNetwork002],
@"Cannot set the network logger delegate: delegate does not conform to the network "
@@ -280,7 +280,7 @@ static NSString *const kFIRNetworkLogTag = @"Firebase/Network";
- (void)handleErrorWithCode:(NSInteger)code
queue:(dispatch_queue_t)queue
withHandler:(FIRNetworkCompletionHandler)handler {
- NSDictionary *userInfo = @{ kFIRNetworkErrorContext : @"Failed to create network request" };
+ NSDictionary *userInfo = @{kFIRNetworkErrorContext : @"Failed to create network request"};
NSError *error =
[[NSError alloc] initWithDomain:kFIRNetworkErrorDomain code:code userInfo:userInfo];
[self firNetwork_logWithLevel:kFIRNetworkLogLevelWarning
diff --git a/Firebase/Core/FIRNetworkURLSession.m b/Firebase/Core/FIRNetworkURLSession.m
index e27a194..d9c6f3a 100644
--- a/Firebase/Core/FIRNetworkURLSession.m
+++ b/Firebase/Core/FIRNetworkURLSession.m
@@ -145,12 +145,10 @@
}
if (!session || !postRequestTask) {
- NSError *error =
- [[NSError alloc] initWithDomain:kFIRNetworkErrorDomain
- code:FIRErrorCodeNetworkRequestCreation
- userInfo:@{
- kFIRNetworkErrorContext : @"Cannot create network session"
- }];
+ NSError *error = [[NSError alloc]
+ initWithDomain:kFIRNetworkErrorDomain
+ code:FIRErrorCodeNetworkRequestCreation
+ userInfo:@{kFIRNetworkErrorContext : @"Cannot create network session"}];
[self callCompletionHandler:handler withResponse:nil data:nil error:error];
return nil;
}
@@ -189,12 +187,10 @@
NSURLSessionDownloadTask *downloadTask = [session downloadTaskWithRequest:request];
if (!session || !downloadTask) {
- NSError *error =
- [[NSError alloc] initWithDomain:kFIRNetworkErrorDomain
- code:FIRErrorCodeNetworkRequestCreation
- userInfo:@{
- kFIRNetworkErrorContext : @"Cannot create network session"
- }];
+ NSError *error = [[NSError alloc]
+ initWithDomain:kFIRNetworkErrorDomain
+ code:FIRErrorCodeNetworkRequestCreation
+ userInfo:@{kFIRNetworkErrorContext : @"Cannot create network session"}];
[self callCompletionHandler:handler withResponse:nil data:nil error:error];
return nil;
}
@@ -263,12 +259,10 @@
// The server responded so ignore the error created by the system.
error = nil;
} else if (!error) {
- error =
- [[NSError alloc] initWithDomain:kFIRNetworkErrorDomain
- code:FIRErrorCodeNetworkInvalidResponse
- userInfo:@{
- kFIRNetworkErrorContext : @"Network Error: Empty network response"
- }];
+ error = [[NSError alloc]
+ initWithDomain:kFIRNetworkErrorDomain
+ code:FIRErrorCodeNetworkInvalidResponse
+ userInfo:@{kFIRNetworkErrorContext : @"Network Error: Empty network response"}];
}
[self callCompletionHandler:handler
@@ -391,8 +385,9 @@
[_loggerDelegate
firNetwork_logWithLevel:kFIRNetworkLogLevelError
messageCode:kFIRNetworkMessageCodeURLSession010
- message:@"Cannot store system completion handler with empty network "
- "session identifier"];
+ message:
+ @"Cannot store system completion handler with empty network "
+ "session identifier"];
return;
}
diff --git a/Firebase/Core/FIROptions.m b/Firebase/Core/FIROptions.m
index b2bdce8..8832d20 100644
--- a/Firebase/Core/FIROptions.m
+++ b/Firebase/Core/FIROptions.m
@@ -39,10 +39,11 @@ NSString *const kFIRIsAnalyticsEnabled = @"IS_ANALYTICS_ENABLED";
NSString *const kFIRIsSignInEnabled = @"IS_SIGNIN_ENABLED";
// Library version ID.
-NSString *const kFIRLibraryVersionID = @"4" // Major version (one or more digits)
- @"00" // Minor version (exactly 2 digits)
- @"04" // Build number (exactly 2 digits)
- @"000"; // Fixed "000"
+NSString *const kFIRLibraryVersionID =
+ @"4" // Major version (one or more digits)
+ @"00" // Minor version (exactly 2 digits)
+ @"04" // Build number (exactly 2 digits)
+ @"000"; // Fixed "000"
// Plist file name.
NSString *const kServiceInfoFileName = @"GoogleService-Info";
// Plist file type.
@@ -105,8 +106,9 @@ static NSDictionary *sDefaultOptionsDictionary = nil;
}
sDefaultOptionsDictionary = [NSDictionary dictionaryWithContentsOfFile:plistFilePath];
if (sDefaultOptionsDictionary == nil) {
- FIRLogError(kFIRLoggerCore, @"I-COR000011", @"The configuration file is not a dictionary: "
- @"'%@.%@'.",
+ FIRLogError(kFIRLoggerCore, @"I-COR000011",
+ @"The configuration file is not a dictionary: "
+ @"'%@.%@'.",
kServiceInfoFileName, kServiceInfoFileType);
}
return sDefaultOptionsDictionary;
@@ -203,8 +205,9 @@ static NSDictionary *sDefaultOptionsDictionary = nil;
}
_optionsDictionary = [[NSDictionary dictionaryWithContentsOfFile:plistPath] mutableCopy];
if (_optionsDictionary == nil) {
- FIRLogError(kFIRLoggerCore, @"I-COR000014", @"The configuration file at %@ does not exist or "
- @"is not a well-formed plist file.",
+ FIRLogError(kFIRLoggerCore, @"I-COR000014",
+ @"The configuration file at %@ does not exist or "
+ @"is not a well-formed plist file.",
plistPath);
return nil;
}
diff --git a/Firebase/Core/FIRReachabilityChecker.m b/Firebase/Core/FIRReachabilityChecker.m
index 34bb764..733dffe 100644
--- a/Firebase/Core/FIRReachabilityChecker.m
+++ b/Firebase/Core/FIRReachabilityChecker.m
@@ -57,8 +57,9 @@ static NSString *const kFIRReachabilityDisconnectedStatus = @"Disconnected";
- (void)setReachabilityApi:(const struct FIRReachabilityApi *)reachabilityApi {
if (reachability_) {
- NSString *message = @"Cannot change reachability API while reachability is running. "
- @"Call stop first.";
+ NSString *message =
+ @"Cannot change reachability API while reachability is running. "
+ @"Call stop first.";
[loggerDelegate_ firNetwork_logWithLevel:kFIRNetworkLogLevelError
messageCode:kFIRNetworkMessageCodeReachabilityChecker000
message:message];
diff --git a/Firebase/Core/FIRURLSchemeUtil.m b/Firebase/Core/FIRURLSchemeUtil.m
index 0e4fc9c..5ae4bd5 100644
--- a/Firebase/Core/FIRURLSchemeUtil.m
+++ b/Firebase/Core/FIRURLSchemeUtil.m
@@ -36,8 +36,9 @@ BOOL fir_areURLSchemesValidForGoogleSignIn(NSArray *urlSchemes) {
return YES;
}
if (!hasReversedClientID) {
- FIRLogInfo(kFIRLoggerCore, @"I-COR000021", @"A reversed client ID should be added as a URL "
- @"scheme to enable Google sign-in.");
+ FIRLogInfo(kFIRLoggerCore, @"I-COR000021",
+ @"A reversed client ID should be added as a URL "
+ @"scheme to enable Google sign-in.");
}
return NO;
}
diff --git a/Firebase/Core/Private/FIRLogger.h b/Firebase/Core/Private/FIRLogger.h
index 7680e04..b7542d5 100644
--- a/Firebase/Core/Private/FIRLogger.h
+++ b/Firebase/Core/Private/FIRLogger.h
@@ -86,7 +86,7 @@ extern void FIRLogBasic(FIRLoggerLevel level,
#else
va_list _Nullable args_ptr
#endif
- );
+);
/**
* The following functions accept the following parameters in order: