Skip to content

Commit ae871b9

Browse files
paulb777andrewheardncooke3
authored
Update to swiftformat 0.51.12 (#11531)
Co-authored-by: Andrew Heard <[email protected]> Co-authored-by: Nick Cooke <[email protected]>
1 parent 98b8da1 commit ae871b9

File tree

80 files changed

+665
-427
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+665
-427
lines changed

CoreOnly/Tests/FirebasePodTest/FirebasePodTest/AppDelegate.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
6262
func application(_ application: UIApplication,
6363
didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
6464
// Called when the user discards a scene session.
65-
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
66-
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
65+
// If any sessions were discarded while the application was not running, this will be called
66+
// shortly after application:didFinishLaunchingWithOptions.
67+
// Use this method to release any resources that were specific to the discarded scenes, as they
68+
// will not return.
6769
}
6870
}

CoreOnly/Tests/FirebasePodTest/FirebasePodTest/SceneDelegate.swift

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,26 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
2020
func scene(_ scene: UIScene,
2121
willConnectTo session: UISceneSession,
2222
options connectionOptions: UIScene.ConnectionOptions) {
23-
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
24-
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
25-
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
23+
// Use this method to optionally configure and attach the UIWindow `window` to the provided
24+
// UIWindowScene `scene`. If using a storyboard, the `window` property will automatically
25+
// be initialized and attached to the scene. This delegate does not imply the connecting
26+
// scene or session are new (see `application:configurationForConnectingSceneSession`
27+
// instead).
2628
guard let _ = (scene as? UIWindowScene) else { return }
2729
}
2830

2931
func sceneDidDisconnect(_ scene: UIScene) {
3032
// Called as the scene is being released by the system.
3133
// This occurs shortly after the scene enters the background, or when its session is discarded.
32-
// Release any resources associated with this scene that can be re-created the next time the scene connects.
33-
// The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead).
34+
// Release any resources associated with this scene that can be re-created the next time the
35+
// scene connects. The scene may re-connect later, as its session was not neccessarily
36+
// discarded (see `application:didDiscardSceneSessions` instead).
3437
}
3538

3639
func sceneDidBecomeActive(_ scene: UIScene) {
3740
// Called when the scene has moved from an inactive state to an active state.
38-
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
41+
// Use this method to restart any tasks that were paused (or not yet started) when the scene was
42+
// inactive.
3943
}
4044

4145
func sceneWillResignActive(_ scene: UIScene) {
@@ -50,7 +54,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
5054

5155
func sceneDidEnterBackground(_ scene: UIScene) {
5256
// Called as the scene transitions from the foreground to the background.
53-
// Use this method to save data, release shared resources, and store enough scene-specific state information
54-
// to restore the scene back to its current state.
57+
// Use this method to save data, release shared resources, and store enough scene-specific state
58+
// information to restore the scene back to its current state.
5559
}
5660
}

Example/watchOSSample/ServiceExtension/NotificationService.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ class NotificationService: UNNotificationServiceExtension {
3737

3838
override func serviceExtensionTimeWillExpire() {
3939
// Called just before the extension will be terminated by the system.
40-
// Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used.
40+
// Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the
41+
// original push payload will be used.
4142
if let contentHandler = contentHandler, let bestAttemptContent = bestAttemptContent {
4243
contentHandler(bestAttemptContent)
4344
}

FirebaseAppCheck/Apps/AppCheckCustomProvideApp/AppCheckCustomProvideApp/MyAppCheckProvider.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ import FirebaseAppCheck
2121
class MyAppCheckProvider: NSObject, AppCheckProvider {
2222
func getToken(completion handler: @escaping AppCheckTokenHandler) {
2323
DispatchQueue.main.async {
24-
// Create or request Firebase App Check token. Usually the token is requested from your server.
24+
// Create or request Firebase App Check token. Usually the token is requested from your
25+
// server.
2526
let myToken = AppCheckToken(
2627
token: "MyToken",
2728
expirationDate: Date(timeIntervalSinceNow: 60 * 60)

FirebaseAppCheck/Apps/AppCheckCustomProvideApp/AppCheckCustomProvideApp/SceneDelegate.swift

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
2222

2323
func scene(_ scene: UIScene, willConnectTo session: UISceneSession,
2424
options connectionOptions: UIScene.ConnectionOptions) {
25-
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
26-
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
27-
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
25+
// Use this method to optionally configure and attach the UIWindow `window` to the provided
26+
// UIWindowScene `scene`. If using a storyboard, the `window` property will automatically
27+
// be initialized and attached to the scene. This delegate does not imply the connecting
28+
// scene or session are new (see `application:configurationForConnectingSceneSession`
29+
// instead).
2830

2931
// Create the SwiftUI view that provides the window contents.
3032
let contentView = ContentView()
@@ -41,13 +43,15 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
4143
func sceneDidDisconnect(_ scene: UIScene) {
4244
// Called as the scene is being released by the system.
4345
// This occurs shortly after the scene enters the background, or when its session is discarded.
44-
// Release any resources associated with this scene that can be re-created the next time the scene connects.
45-
// The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead).
46+
// Release any resources associated with this scene that can be re-created the next time the
47+
// scene connects. The scene may re-connect later, as its session was not necessarily
48+
// discarded (see `application:didDiscardSceneSessions` instead).
4649
}
4750

4851
func sceneDidBecomeActive(_ scene: UIScene) {
4952
// Called when the scene has moved from an inactive state to an active state.
50-
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
53+
// Use this method to restart any tasks that were paused (or not yet started) when the scene was
54+
// inactive.
5155
}
5256

5357
func sceneWillResignActive(_ scene: UIScene) {
@@ -62,7 +66,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
6266

6367
func sceneDidEnterBackground(_ scene: UIScene) {
6468
// Called as the scene transitions from the foreground to the background.
65-
// Use this method to save data, release shared resources, and store enough scene-specific state information
66-
// to restore the scene back to its current state.
69+
// Use this method to save data, release shared resources, and store enough scene-specific state
70+
// information to restore the scene back to its current state.
6771
}
6872
}

FirebaseAppCheck/Apps/FIRAppCheckTestApp/FIRAppCheckTestApp/AppDelegate.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
5858
func application(_ application: UIApplication,
5959
didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
6060
// Called when the user discards a scene session.
61-
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
62-
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
61+
// If any sessions were discarded while the application was not running, this will be called
62+
// shortly after application:didFinishLaunchingWithOptions.
63+
// Use this method to release any resources that were specific to the discarded scenes, as they
64+
// will not return.
6365
}
6466

6567
// MARK: App Check providers

FirebaseAppCheck/Apps/FIRAppCheckTestApp/FIRAppCheckTestApp/SceneDelegate.swift

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,26 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
2121

2222
func scene(_ scene: UIScene, willConnectTo session: UISceneSession,
2323
options connectionOptions: UIScene.ConnectionOptions) {
24-
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
25-
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
26-
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
24+
// Use this method to optionally configure and attach the UIWindow `window` to the provided
25+
// UIWindowScene `scene`. If using a storyboard, the `window` property will automatically
26+
// be initialized and attached to the scene. This delegate does not imply the connecting
27+
// scene or session are new (see `application:configurationForConnectingSceneSession`
28+
// instead).
2729
guard let _ = (scene as? UIWindowScene) else { return }
2830
}
2931

3032
func sceneDidDisconnect(_ scene: UIScene) {
3133
// Called as the scene is being released by the system.
3234
// This occurs shortly after the scene enters the background, or when its session is discarded.
33-
// Release any resources associated with this scene that can be re-created the next time the scene connects.
34-
// The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead).
35+
// Release any resources associated with this scene that can be re-created the next time the
36+
// scene connects. The scene may re-connect later, as its session was not necessarily
37+
// discarded (see `application:didDiscardSceneSessions` instead).
3538
}
3639

3740
func sceneDidBecomeActive(_ scene: UIScene) {
3841
// Called when the scene has moved from an inactive state to an active state.
39-
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
42+
// Use this method to restart any tasks that were paused (or not yet started) when the scene was
43+
// inactive.
4044
}
4145

4246
func sceneWillResignActive(_ scene: UIScene) {
@@ -51,7 +55,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
5155

5256
func sceneDidEnterBackground(_ scene: UIScene) {
5357
// Called as the scene transitions from the foreground to the background.
54-
// Use this method to save data, release shared resources, and store enough scene-specific state information
55-
// to restore the scene back to its current state.
58+
// Use this method to save data, release shared resources, and store enough scene-specific state
59+
// information to restore the scene back to its current state.
5660
}
5761
}

FirebaseAppDistributionInternal/Sources/ApiService.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,10 @@ struct FeedbackReport: Codable {
122122
})
123123
}
124124

125-
@objc(fetchReleasesWithCompletion:) public static func fetchReleases(completion: @escaping (_ releases: [Any]?,
126-
_ error: Error?)
125+
@objc(fetchReleasesWithCompletion:) public static func fetchReleases(completion: @escaping (_ releases: [
126+
Any,
127+
]?,
128+
_ error: Error?)
127129
-> Void) {
128130
guard let app = FirebaseApp.app() else {
129131
return

FirebaseAppDistributionInternal/Sources/InAppFeedback.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ import Photos
8888
static func getPhotoPermissionIfNecessary(completionHandler: @escaping (_ authorized: Bool)
8989
-> Void) {
9090
if #available(iOS 14, *) {
91-
// The iOS 14 API is used to prompt users for permission if they previously provided limited access,
92-
// but have now taken an additional screenshot.
91+
// The iOS 14 API is used to prompt users for permission if they previously provided limited
92+
// access, but have now taken an additional screenshot.
9393
guard PHPhotoLibrary.authorizationStatus(for: .readWrite) != .authorized else {
9494
completionHandler(true)
9595
return

FirebaseAuth/Tests/Sample/SwiftApiTests/FacebookTests.swift

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,8 @@ import XCTest
113113
// }
114114
// #endif
115115
//
116-
// /// ** Creates a Facebook testing account using Facebook Graph API and return a dictionary that
117-
// // * constains "id", "access_token", "login_url", "email" and "password" of the created account.
118-
// // */
116+
// /// Creates a Facebook testing account using Facebook Graph API and return a dictionary that
117+
// /// constrains "id", "access_token", "login_url", "email" and "password" of the created account.
119118
// func createFacebookTestingAccount() -> [String: Any] {
120119
// var returnValue: [String: Any] = [:]
121120
// let urltoCreateTestUser = "https://graph.facebook.com/\(Credentials.kFacebookAppID)" +
@@ -154,9 +153,9 @@ import XCTest
154153
//
155154
// #if compiler(>=5.5.2) && canImport(_Concurrency)
156155
// @available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
157-
// /// ** Creates a Facebook testing account using Facebook Graph API and return a dictionary that
158-
// // * constains "id", "access_token", "login_url", "email" and "password" of the created account.
159-
// // */
156+
// /// Creates a Facebook testing account using Facebook Graph API and return a dictionary that
157+
// /// constains "id", "access_token", "login_url", "email" and "password" of the created
158+
// /// account.
160159
// func createFacebookTestingAccountAsync() async throws -> [String: Any] {
161160
// let urltoCreateTestUser = "https://graph.facebook.com/\(Credentials.kFacebookAppID)" +
162161
// "/accounts/test-users"

0 commit comments

Comments
 (0)