Skip to content

Commit

Permalink
SwiftFormat update
Browse files Browse the repository at this point in the history
  • Loading branch information
paulb777 committed Nov 22, 2023
1 parent bcac846 commit 8730668
Show file tree
Hide file tree
Showing 34 changed files with 50 additions and 54 deletions.
18 changes: 9 additions & 9 deletions FirebaseAuth/Sources/Swift/Auth/Auth.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

import Foundation

import FirebaseCore
import FirebaseCoreExtension
import FirebaseAppCheckInterop
import FirebaseAuthInterop
import FirebaseCore
import FirebaseCoreExtension
#if COCOAPODS
@_implementationOnly import GoogleUtilities
#else
Expand Down Expand Up @@ -385,8 +385,8 @@ extension Auth: AuthInterop {
@remarks This is the internal counterpart of this method, which uses a callback that does not
update the current user.
*/
internal func internalSignInUser(withEmail email: String,
password: String) async throws -> User {
func internalSignInUser(withEmail email: String,
password: String) async throws -> User {
let request = VerifyPasswordRequest(email: email,
password: password,
requestConfiguration: requestConfiguration)
Expand Down Expand Up @@ -1969,7 +1969,7 @@ extension Auth: AuthInterop {
objc_sync_exit(Auth.self)
}

internal func signOutByForce(withUserID userID: String) throws {
func signOutByForce(withUserID userID: String) throws {
guard currentUser?.uid == userID else {
return
}
Expand Down Expand Up @@ -2177,8 +2177,8 @@ extension Auth: AuthInterop {
isReauthentication: false)
}

internal func internalSignInAndRetrieveData(withCredential credential: AuthCredential,
isReauthentication: Bool) async throws
func internalSignInAndRetrieveData(withCredential credential: AuthCredential,
isReauthentication: Bool) async throws
-> AuthDataResult {
if let emailCredential = credential as? EmailAuthCredential {
// Special case for email/password credentials
Expand Down Expand Up @@ -2488,13 +2488,13 @@ extension Auth: AuthInterop {
/** @property mainBundle
@brief Allow tests to swap in an alternate mainBundle.
*/
internal var mainBundleUrlTypes: [[String: Any]]!
var mainBundleUrlTypes: [[String: Any]]!

/** @property requestConfiguration
@brief The configuration object comprising of parameters needed to make a request to Firebase
Auth's backend.
*/
internal var requestConfiguration: AuthRequestConfiguration
var requestConfiguration: AuthRequestConfiguration

#if os(iOS)
/** @property tokenManager
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAuth/Sources/Swift/Auth/AuthComponent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import Foundation
import FirebaseAppCheckInterop
import FirebaseCore
import FirebaseCoreExtension
import Foundation

@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
@objc(FIRAuthProvider) protocol AuthProvider {
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAuth/Sources/Swift/Auth/AuthGlobalWorkQueue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

import Foundation

internal let kAuthGlobalWorkQueue = DispatchQueue(label: "com.google.firebase.auth.globalWorkQueue")
let kAuthGlobalWorkQueue = DispatchQueue(label: "com.google.firebase.auth.globalWorkQueue")
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import Foundation
import CommonCrypto
import Foundation

/**
@brief Utility class for constructing OAuth Sign In credentials.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import Foundation
import FirebaseCore
import Foundation

/**
@brief A concrete implementation of `AuthProvider` for phone auth providers.
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAuth/Sources/Swift/Backend/AuthBackend.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import Foundation
import FirebaseCore
import FirebaseCoreExtension
import FirebaseCoreInternal
import Foundation
#if COCOAPODS
import GTMSessionFetcher
#else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

import Foundation

import FirebaseAppCheckInterop
// TODO: Investigate how to directly depend on FIRHeartbeatLogger instead of using a protocol so
// FirebaseCoreExtension can be an implementation only protocol.
import FirebaseCoreExtension
import FirebaseAppCheckInterop

/** @class FIRAuthRequestConfiguration
@brief Defines configurations to be added to a request to Firebase Auth's backend.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import Foundation
import FirebaseCoreExtension
import Foundation

/** @var kAccountPrefix
@brief The prefix string for keychain item account attribute before the key.
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAuth/Sources/Swift/User/User.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1999,7 +1999,7 @@ extension User: NSSecureCoding {}
@param callback The callback to be called in main thread.
@param error The error to pass to callback.
*/
internal class func callInMainThreadWithError(callback: ((Error?) -> Void)?, error: Error?) {
class func callInMainThreadWithError(callback: ((Error?) -> Void)?, error: Error?) {
if let callback {
DispatchQueue.main.async {
callback(error)
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAuth/Sources/Swift/Utilities/AuthLog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import Foundation
import FirebaseCoreExtension
import Foundation

enum AuthLog {
static func logInfo(code: String, message: String) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
#if os(iOS)

import Foundation
import SafariServices
import UIKit
import WebKit
import SafariServices

/** @class AuthURLPresenter
@brief A Class responsible for presenting URL via SFSafariViewController or WKWebView.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import UIKit
import FirebaseCore
import FBSDKCoreKit
import FirebaseCore
import GoogleSignIn
import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import UIKit
@testable import FirebaseAuth
import FirebaseCore
import UIKit

/// Manage FirebaseApp instances for the Sample app

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import UIKit
import FirebaseDynamicLinks
import FirebaseAuth
import FirebaseDynamicLinks
import UIKit

class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import Foundation
import CryptoKit
import Foundation

/// Set of utility APIs for generating cryptographical artifacts.
enum CryptoUtils {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import UIKit
import FirebaseAuth
import UIKit

// MARK: - Extending a `Firebase User` to conform to `DataSourceProvidable`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import UIKit
import FirebaseCore
import FirebaseAuth
import FirebaseCore
import UIKit

// For Account Linking with Sign in with Google.
import GoogleSignIn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import UIKit
// For Sign in with Facebook
import FBSDKLoginKit
import FirebaseAuth
// [START auth_import]
import FirebaseCore
import FirebaseAuth
// [END auth_import]

// For Sign in with Google
// [START google_import]
import GoogleSignIn
// [END google_import]

// For Sign in with Facebook
import FBSDKLoginKit
import UIKit

// For Sign in with Apple
import AuthenticationServices
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import UIKit
import FirebaseAuth
import UIKit

class LoginController: UIViewController {
weak var delegate: LoginDelegate?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import UIKit
import FirebaseAuth
import UIKit

class CustomAuthViewController: OtherAuthViewController {
override func viewDidLoad() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import UIKit
import FirebaseAuth
import UIKit

class PasswordlessViewController: OtherAuthViewController {
private var email: String!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import UIKit
import FirebaseAuth
import UIKit

class PhoneAuthViewController: OtherAuthViewController {
override func viewDidLoad() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import UIKit
@testable import FirebaseAuth
import FirebaseCore
import UIKit

/// Namespace for performable actions on a Auth Settings view
enum SettingsAction: String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import UIKit
import FirebaseAuth
import AuthenticationServices
import CryptoKit
import FirebaseAuth
import UIKit

class UserViewController: UIViewController, DataSourceProviderDelegate {
var dataSourceProvider: DataSourceProvider<User>!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

import XCTest
import FirebaseAuth
import XCTest

let kNoSecondFactorUserEmail = "[email protected]"
let kNoSecondFactorUserPassword = "aaaaaa"
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAuth/Tests/Unit/AuthKeychainServicesTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class AuthKeychainServicesTests: XCTestCase {
static let otherData = "OTHER_DATA"

static var account: String {
Self.accountPrefix + Self.key
accountPrefix + key
}

var keychain: AuthKeychainServices!
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAuth/Tests/Unit/AuthProviderIDTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import FirebaseAuth
import Foundation
import XCTest
import FirebaseAuth

@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
final class AuthProviderIDTests: XCTestCase {
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAuth/Tests/Unit/AuthURLPresenterTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import Foundation
import XCTest

import FirebaseCore
@testable import FirebaseAuth
import FirebaseCore
import SafariServices

@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
Expand Down
4 changes: 2 additions & 2 deletions FirebaseAuth/Tests/Unit/Fakes/FakeAppCheck.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import Foundation
@testable import FirebaseAuth
import FirebaseAppCheckInterop
@testable import FirebaseAuth
import Foundation

class FakeAppCheck: NSObject, AppCheckInterop {
let fakeAppCheckToken = "fakeAppCheckToken"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import Foundation
@testable import FirebaseAuth
import Foundation
import XCTest

/** @class AuthKeychainStorage
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAuth/Tests/Unit/MultiFactorResolverTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import Foundation
import XCTest

import FirebaseCore
@testable import FirebaseAuth
import FirebaseCore

#if os(iOS)
@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
Expand Down
2 changes: 1 addition & 1 deletion FirebaseAuth/Tests/Unit/OAuthProviderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import Foundation
import XCTest

import FirebaseCore
@testable import FirebaseAuth
import FirebaseCore

#if os(iOS)
@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
Expand Down
Loading

0 comments on commit 8730668

Please sign in to comment.