Skip to content

Commit 678371f

Browse files
author
Daniel Browne
committed
Correct code comment typos
1 parent 291062b commit 678371f

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

Sources/Extensions/PusherWebsocketDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ extension PusherConnection: WebSocketConnectionDelegate {
4949
public func webSocketDidDisconnect(connection: WebSocketConnection,
5050
closeCode: NWProtocolWebSocket.CloseCode,
5151
reason: Data?) {
52-
// Handles setting channel subscriptions to unsubscribed wheter disconnection
52+
// Handles setting channel subscriptions to unsubscribed whether disconnection
5353
// is intentional or not
5454
if connectionState == .disconnecting || connectionState == .connected {
5555
for (_, channel) in self.channels.channels {

Sources/Helpers/PusherLogger.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ internal class PusherLogger {
2525
case networkConnectionViable = "Network connection became viable"
2626
case networkConnectionUnviable = "Network connection became unviable"
2727

28-
// Websockets
28+
// WebSocket
2929

3030
case attemptReconnectionAfterWaiting = "Attempting to reconnect after waiting"
3131
case attemptReconnectionImmediately = "Attempting to reconnect immediately"

Sources/Models/PusherChannel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ open class PusherChannel: NSObject {
5252
}
5353

5454
/**
55-
Initializes a new PusherChannel with a given name and conenction
55+
Initializes a new PusherChannel with a given name and connection
5656

5757
- parameter name: The name of the channel
5858
- parameter connection: The connection that this channel is relevant to
@@ -81,7 +81,7 @@ open class PusherChannel: NSObject {
8181
@discardableResult open func bind(eventName: String, callback: @escaping (Any?) -> Void) -> String {
8282
return bind(eventName: eventName, eventCallback: { [weak self] (event: PusherEvent) -> Void in
8383
guard let self = self else { return }
84-
// Mimic the old parsing behaviour for backwards compatibility
84+
// Mimic the old parsing behavior for backwards compatibility
8585
let callbackData: Any?
8686
if self.shouldParseJSONForLegacyCallbacks {
8787
if let data = event.dataToJSONObject() {

Sources/Models/PusherChannels.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import Foundation
4747
}
4848

4949
/**
50-
Create a new PresencPusherChannel, which is returned, and add it to the PusherChannels
50+
Create a new PresencePusherChannel, which is returned, and add it to the PusherChannels
5151
list of channels
5252

5353
- parameter channelName: The name of the channel to create

Sources/Models/PusherPresenceChannel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public typealias PusherUserInfoObject = [String: AnyObject]
1010
open var myId: String?
1111

1212
/**
13-
Initializes a new PusherPresenceChannel with a given name, conenction, and optional
13+
Initializes a new PusherPresenceChannel with a given name, connection, and optional
1414
member added and member removed handler functions
1515

1616
- parameter name: The name of the channel

Sources/Services/PusherConnection.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import NWWebSocket
4646
- parameter key: The Pusher app key
4747
- parameter socket: The websocket object
4848
- parameter url: The URL the connection is made to
49-
- parameter options: A PusherClientOptions instance containing all of the user-speficied
49+
- parameter options: A PusherClientOptions instance containing all of the user-specified
5050
client options
5151
- parameter URLSession: An NSURLSession instance for the connection to use for making
5252
authentication requests
@@ -271,7 +271,7 @@ import NWWebSocket
271271
}
272272

273273
/**
274-
Instantiate a new GloblalChannel instance for the connection
274+
Instantiate a new GlobalChannel instance for the connection
275275
*/
276276
internal func createGlobalChannel() {
277277
self.globalChannel = GlobalChannel(connection: self)
@@ -404,7 +404,7 @@ import NWWebSocket
404404

405405
/**
406406
Schedule a timer that will fire if no pong response is received within the
407-
pongResponseTImeoutInterval
407+
pongResponseTimeoutInterval
408408
*/
409409
fileprivate func setupPongResponseTimeoutTimer() {
410410
pongResponseTimeoutTimer = Timer.scheduledTimer(
@@ -758,7 +758,7 @@ import NWWebSocket
758758

759759
- parameter endpoint: The authEndpoint to which the request will be made
760760
- parameter socketId: The socketId of the connection's websocket
761-
- parameter channel: The PusherChannel to authenticate subsciption for
761+
- parameter channel: The PusherChannel to authenticate subscription for
762762

763763
- returns: URLRequest object to be used by the function making the auth request
764764
*/
@@ -777,7 +777,7 @@ import NWWebSocket
777777
Send authentication request to the authEndpoint specified
778778

779779
- parameter request: The request to send
780-
- parameter channel: The PusherChannel to authenticate subsciption for
780+
- parameter channel: The PusherChannel to authenticate subscription for
781781
*/
782782
fileprivate func sendAuthorisationRequest(request: URLRequest,
783783
channel: PusherChannel,
@@ -846,7 +846,7 @@ import NWWebSocket
846846

847847
- parameter authString: The auth response as a dictionary
848848
- parameter channelData: The channelData to send along with the auth request
849-
- parameter channel: The PusherChannel to authorize the subsciption for
849+
- parameter channel: The PusherChannel to authorize the subscription for
850850
*/
851851
fileprivate func handleAuthInfo(pusherAuth: PusherAuth, channel: PusherChannel) {
852852
if let decryptionKey = pusherAuth.sharedSecret {
@@ -864,7 +864,7 @@ import NWWebSocket
864864
Handle presence channel auth response and send subscribe message to Pusher API
865865

866866
- parameter auth: The auth string
867-
- parameter channel: The PusherChannel to authorize subsciption for
867+
- parameter channel: The PusherChannel to authorize subscription for
868868
- parameter channelData: The channelData to send along with the auth request
869869
*/
870870
fileprivate func handlePresenceChannelAuth(
@@ -888,7 +888,7 @@ import NWWebSocket
888888
Handle private channel auth response and send subscribe message to Pusher API
889889

890890
- parameter auth: The auth string
891-
- parameter channel: The PusherChannel to authenticate subsciption for
891+
- parameter channel: The PusherChannel to authenticate subscription for
892892
*/
893893
fileprivate func handlePrivateChannelAuth(authValue auth: String, channel: PusherChannel) {
894894
self.sendEvent(

Tests/Unit/Models/PrivateEncryptedChannelTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ class PrivateEncryptedChannelTests: XCTestCase {
193193
waitForExpectations(timeout: 1)
194194

195195
// set a new expectation for the error delegate for the second event
196-
errorDelegate.expectation = expectation(description: "second event should fail to decrpyt too.")
196+
errorDelegate.expectation = expectation(description: "second event should fail to decrypt too.")
197197

198198
// send a second message
199199
socket.delegate?.webSocketDidReceiveMessage(
@@ -375,7 +375,7 @@ class PrivateEncryptedChannelTests: XCTestCase {
375375
}
376376
}
377377

378-
// utility method to mock an authorizor response with the jsonData provided
378+
// utility method to mock an authorizer response with the jsonData provided
379379
func mockAuthResponse(jsonData: String, pusher: Pusher) {
380380
let urlResponse = HTTPURLResponse(
381381
url: URL(string: "\(authEndpointURL)?channel_name=\(channelName)&socket_id=45481.3166671")!,

0 commit comments

Comments
 (0)