Skip to content

Commit 88677ce

Browse files
committed
Fix further linting issues
1 parent 2c73bbb commit 88677ce

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
@@ -138,21 +138,22 @@ class AuthBackend: AuthBackendProtocol {
138138
private static func phoneCredentialInUse(response: AuthRPCResponse) -> Error? {
139139
#if !os(iOS)
140140
return nil
141+
#else
142+
if let phoneAuthResponse = response as? VerifyPhoneNumberResponse,
143+
let phoneNumber = phoneAuthResponse.phoneNumber,
144+
phoneNumber.count > 0,
145+
let temporaryProof = phoneAuthResponse.temporaryProof,
146+
temporaryProof.count > 0 {
147+
let credential = PhoneAuthCredential(withTemporaryProof: temporaryProof,
148+
phoneNumber: phoneNumber,
149+
providerID: PhoneAuthProvider.id)
150+
return AuthErrorUtils.credentialAlreadyInUseError(message: nil,
151+
credential: credential,
152+
email: nil)
153+
} else {
154+
return nil
155+
}
141156
#endif // !os(iOS)
142-
if let phoneAuthResponse = response as? VerifyPhoneNumberResponse,
143-
let phoneNumber = phoneAuthResponse.phoneNumber,
144-
phoneNumber.count > 0,
145-
let temporaryProof = phoneAuthResponse.temporaryProof,
146-
temporaryProof.count > 0 {
147-
let credential = PhoneAuthCredential(withTemporaryProof: temporaryProof,
148-
phoneNumber: phoneNumber,
149-
providerID: PhoneAuthProvider.id)
150-
return AuthErrorUtils.credentialAlreadyInUseError(message: nil,
151-
credential: credential,
152-
email: nil)
153-
} else {
154-
return nil
155-
}
156157
}
157158

158159
/// Calls the RPC using HTTP request.

0 commit comments

Comments
 (0)