Skip to content

Commit

Permalink
[nits] ran swiftlint
Browse files Browse the repository at this point in the history
  • Loading branch information
nan-li committed Apr 29, 2024
1 parent a0df196 commit 581f159
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions iOS_SDK/OneSignalSDK/OneSignalCoreMocks/.swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# in tests, we may want to force cast and throw any errors
disabled_rules:
- force_cast
- identifier_name
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class OSIdentityModel: OSModel {
}
self.set(property: "aliases", newValue: aliases)
}

/**
Called to clear the model's data in preparation for hydration via a fetch user call.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class OSRequestCreateUser: OneSignalRequest, OSUserRequest {
OneSignalLog.onesignalLog(.LL_DEBUG, message: "Cannot generate the create user request due to null app ID.")
return false
}
let _ = self.addPushSubscriptionIdToAdditionalHeaders()
_ = self.addPushSubscriptionIdToAdditionalHeaders()
self.addJWTHeader(identityModel: identityModel)
self.path = "apps/\(appId)/users"
// The pushSub doesn't need to have a token.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class OSRequestUpdateProperties: OneSignalRequest, OSUserRequest {
func prepareForExecution() -> Bool {
if let onesignalId = identityModel.onesignalId,
let appId = OneSignalConfigManager.getAppId() {
let _ = self.addPushSubscriptionIdToAdditionalHeaders()
_ = self.addPushSubscriptionIdToAdditionalHeaders()
self.addJWTHeader(identityModel: identityModel)
self.path = "apps/\(appId)/users/by/\(OS_ONESIGNAL_ID)/\(onesignalId)"
return true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ internal extension OneSignalRequest {
// additionalHeaders["Authorization"] = "Bearer \(token)"
// self.additionalHeaders = additionalHeaders
}

/** Returns if the `OneSignal-Subscription-Id` header was added successfully. */
func addPushSubscriptionIdToAdditionalHeaders() -> Bool {
if let pushSubscriptionId = OneSignalUserManagerImpl.sharedInstance.pushSubscriptionId {
Expand Down
2 changes: 2 additions & 0 deletions iOS_SDK/OneSignalSDK/OneSignalUserMocks/.swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
disabled_rules:
- identifier_name

0 comments on commit 581f159

Please sign in to comment.