Skip to content

Commit 956b6c9

Browse files
committed
Tidying up a few small bits, stylistically
1 parent 70bb25e commit 956b6c9

File tree

5 files changed

+16
-11
lines changed

5 files changed

+16
-11
lines changed

Source/PusherConnection.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ open class PusherConnection: NSObject {
132132
- parameter channelName: The name of the channel
133133
*/
134134
internal func unsubscribe(channelName: String) {
135-
if let chan = self.channels.find(name: channelName) , chan.subscribed {
135+
if let chan = self.channels.find(name: channelName), chan.subscribed {
136136
self.sendEvent(event: "pusher:unsubscribe",
137137
data: [
138138
"channel": channelName

Source/PusherGlobalChannel.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ open class GlobalChannel: PusherChannel {
4141
/**
4242
Calls the appropriate callbacks for the given event name in the scope of the global channel
4343

44-
- parameter name: The name of the received event
45-
- parameter data: The data associated with the received message
46-
*/
44+
- parameter name: The name of the received event
45+
- parameter data: The data associated with the received message
46+
*/
4747
internal func handleErrorEvent(name: String, data: [String: AnyObject]) {
4848
for (_, callback) in self.globalCallbacks {
4949
callback(["event": name, "data": data])

Source/PusherSwift.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ let CLIENT_NAME = "pusher-websocket-swift"
4949

5050
#if os(tvOS)
5151
/**
52-
Initializes the Pusher client with an app key and any appropriate options.
52+
Initializes the Pusher client with an app key and any appropriate options.
5353

54-
- parameter key: The Pusher app key
55-
- parameter options: An optional collection of options
54+
- parameter key: The Pusher app key
55+
- parameter options: An optional collection of options
5656

57-
- returns: A new Pusher client instance
58-
*/
57+
- returns: A new Pusher client instance
58+
*/
5959
public init(key: String, options: PusherClientOptions = PusherClientOptions()) {
6060
self.key = key
6161
let urlString = constructUrl(key: key, options: options)
@@ -76,7 +76,7 @@ let CLIENT_NAME = "pusher-websocket-swift"
7676
member who has just left the presence channel
7777

7878
- returns: A new PusherChannel instance
79-
*/
79+
*/
8080
open func subscribe(
8181
_ channelName: String,
8282
onMemberAdded: ((PusherPresenceChannelMember) -> ())? = nil,

Source/PusherWebsocketDelegate.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ extension PusherConnection: WebSocketDelegate {
105105
reconnectAttempts += 1
106106
}
107107

108+
/**
109+
Delegate method called when a websocket connected
110+
111+
- parameter ws: The websocket that connected
112+
*/
108113
public func websocketDidConnect(socket ws: WebSocket) {
109114
self.socketConnected = true
110115
}

Source/TaskQueue.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
internal class TaskQueue: CustomStringConvertible {
3636
public typealias ClosureNoResultNext = () -> Void
37-
public typealias ClosureWithResultNext = (Any? , @escaping (Any?) -> Void) -> Void
37+
public typealias ClosureWithResultNext = (Any?, @escaping (Any?) -> Void) -> Void
3838

3939
internal var tasks = [ClosureWithResultNext]()
4040
internal lazy var completions = [ClosureNoResultNext]()

0 commit comments

Comments
 (0)