Skip to content

Commit

Permalink
SwiftLint
Browse files Browse the repository at this point in the history
  • Loading branch information
jguz-pubnub committed Jul 18, 2024
1 parent 375d62a commit 42c7706
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Sources/PubNub/KMM/PubNubObjC+AppContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ public extension PubNubObjC {
) {
pubnub.removeMembers(
channel: channel,
uuids: uuids.map {
uuids: uuids.map {
PubNubMembershipMetadataBase(
uuidMetadataId: $0,
channelMetadataId: channel
Expand Down
12 changes: 6 additions & 6 deletions Sources/PubNub/KMM/PubNubObjC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import Foundation
@objc
public class PubNubObjC: NSObject {
let pubnub: PubNub

@objc
public let configObjC: PubNubConfigurationObjC

public init(pubnub: PubNub) {
self.pubnub = pubnub
self.configObjC = PubNubConfigurationObjC(configuration: pubnub.configuration)
Expand Down Expand Up @@ -82,19 +82,19 @@ public extension PubNubObjC {
@objc
public class PubNubConfigurationObjC: NSObject {
let configuration: PubNubConfiguration

public init(configuration: PubNubConfiguration) {
self.configuration = configuration
}

@objc
public var userId: String {
configuration.userId
}

@objc
public var authKey: String? {
configuration.authKey
}

}
8 changes: 4 additions & 4 deletions Sources/PubNub/KMM/Wrappers/PubNubErrorObjC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ import Foundation
@objc
public class PubNubErrorObjC: NSError {
let underlying: Error

init(underlying: Error) {
self.underlying = underlying
super.init(domain: "pubnub", code: (underlying as? PubNubError)?.reason.rawValue ?? 0)
}

required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

@objc
public override var localizedDescription: String {
underlying.localizedDescription
}

@objc
public var statusCode: Int {
if let response = (underlying as? PubNubError)?.affected.findFirst(by: PubNubError.AffectedValue.response) {
Expand Down
2 changes: 1 addition & 1 deletion Sources/PubNub/KMM/Wrappers/PubNubSubscriptionObjC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public class PubNubSubscriptionSetObjC: NSObject {
init(subscriptionSet: SubscriptionSet) {
self.subscriptionSet = subscriptionSet
}

@objc
public init(subscriptions: [PubNubSubscriptionObjC]) {
self.subscriptionSet = SubscriptionSet(subscriptions: subscriptions.map { $0.subscription })
Expand Down

0 comments on commit 42c7706

Please sign in to comment.