Skip to content

Commit 766d34b

Browse files
committed
Fix further linting issues
1 parent c4a4518 commit 766d34b

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

FirebaseAuth/Sources/Swift/Backend/AuthBackend.swift

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -146,21 +146,22 @@ class AuthBackend: AuthBackendProtocol {
146146
private static func phoneCredentialInUse(response: AuthRPCResponse) -> Error? {
147147
#if !os(iOS)
148148
return nil
149+
#else
150+
if let phoneAuthResponse = response as? VerifyPhoneNumberResponse,
151+
let phoneNumber = phoneAuthResponse.phoneNumber,
152+
phoneNumber.count > 0,
153+
let temporaryProof = phoneAuthResponse.temporaryProof,
154+
temporaryProof.count > 0 {
155+
let credential = PhoneAuthCredential(withTemporaryProof: temporaryProof,
156+
phoneNumber: phoneNumber,
157+
providerID: PhoneAuthProvider.id)
158+
return AuthErrorUtils.credentialAlreadyInUseError(message: nil,
159+
credential: credential,
160+
email: nil)
161+
} else {
162+
return nil
163+
}
149164
#endif // !os(iOS)
150-
if let phoneAuthResponse = response as? VerifyPhoneNumberResponse,
151-
let phoneNumber = phoneAuthResponse.phoneNumber,
152-
phoneNumber.count > 0,
153-
let temporaryProof = phoneAuthResponse.temporaryProof,
154-
temporaryProof.count > 0 {
155-
let credential = PhoneAuthCredential(withTemporaryProof: temporaryProof,
156-
phoneNumber: phoneNumber,
157-
providerID: PhoneAuthProvider.id)
158-
return AuthErrorUtils.credentialAlreadyInUseError(message: nil,
159-
credential: credential,
160-
email: nil)
161-
} else {
162-
return nil
163-
}
164165
}
165166

166167
/// Calls the RPC using HTTP request.

0 commit comments

Comments
 (0)