Skip to content

Commit bccacdc

Browse files
committed
Resolve various code style SwiftLint warnings.
1 parent f3020b3 commit bccacdc

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

Sources/PusherClientOptions.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ public enum PusherHost {
66

77
public var stringValue: String {
88
switch self {
9-
case .host(let host): return host
10-
case .cluster(let cluster): return "ws-\(cluster).pusher.com"
9+
case .host(let host): return host
10+
case .cluster(let cluster): return "ws-\(cluster).pusher.com"
1111
}
1212
}
1313
}

Tests/Helpers.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func convertStringToDictionary(_ text: String) -> [String: AnyObject]? {
2121
extension AuthMethod: Equatable {
2222
}
2323

24-
public func ==(lhs: AuthMethod, rhs: AuthMethod) -> Bool {
24+
public func == (lhs: AuthMethod, rhs: AuthMethod) -> Bool {
2525
switch (lhs, rhs) {
2626
case (let .endpoint(authEndpoint1), let .endpoint(authEndpoint2)):
2727
return authEndpoint1 == authEndpoint2

Tests/Mocks.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,12 +294,11 @@ public typealias Response = (data: Data?, urlResponse: URLResponse?, error: NSEr
294294

295295
public class MockSession: URLSession {
296296
static public var mockResponses: [String: Response] = [:]
297+
//swiftlint:disable:next large_tuple
297298
static public var mockResponse: (data: Data?, urlResponse: URLResponse?, error: NSError?) = (data: nil, urlResponse: nil, error: nil)
298299

299300
override public class var shared: URLSession {
300-
get {
301-
return MockSession()
302-
}
301+
return MockSession()
303302
}
304303

305304
override public func dataTask(with: URLRequest, completionHandler: @escaping (Data?, URLResponse?, Error?) -> Void) -> URLSessionDataTask {

0 commit comments

Comments
 (0)