@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $this->apiCall('rtm.start') |
| 79 | 79 | |
| 80 | 80 | // then connect to the socket... |
| 81 | - ->then(function (Payload $response) { |
|
| 81 | + ->then(function(Payload $response) { |
|
| 82 | 82 | $responseData = $response->getData(); |
| 83 | 83 | // get the team info |
| 84 | 84 | $this->team = new Team($this, $responseData['team']); |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | |
| 118 | 118 | // initiate the websocket connection |
| 119 | 119 | $this->websocket = new WebSocket($responseData['url'], $this->loop, $logger); |
| 120 | - $this->websocket->on('message', function ($message) { |
|
| 120 | + $this->websocket->on('message', function($message) { |
|
| 121 | 121 | $this->onMessage($message); |
| 122 | 122 | }); |
| 123 | 123 | |
@@ -125,18 +125,18 @@ discard block |
||
| 125 | 125 | }, function($exception) use ($deferred) { |
| 126 | 126 | // if connection was not succesfull |
| 127 | 127 | $deferred->reject(new ConnectionException( |
| 128 | - 'Could not connect to Slack API: '. $exception->getMessage(), |
|
| 128 | + 'Could not connect to Slack API: '.$exception->getMessage(), |
|
| 129 | 129 | $exception->getCode() |
| 130 | 130 | )); |
| 131 | 131 | }) |
| 132 | 132 | |
| 133 | 133 | // then wait for the connection to be ready. |
| 134 | - ->then(function () use ($deferred) { |
|
| 135 | - $this->once('hello', function () use ($deferred) { |
|
| 134 | + ->then(function() use ($deferred) { |
|
| 135 | + $this->once('hello', function() use ($deferred) { |
|
| 136 | 136 | $deferred->resolve(); |
| 137 | 137 | }); |
| 138 | 138 | |
| 139 | - $this->once('error', function ($data) use ($deferred) { |
|
| 139 | + $this->once('error', function($data) use ($deferred) { |
|
| 140 | 140 | $deferred->reject(new ConnectionException( |
| 141 | 141 | 'Could not connect to WebSocket: '.$data['error']['msg'], |
| 142 | 142 | $data['error']['code'])); |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | */ |
| 262 | 262 | public function setDM(DirectMessageChannel $dm) |
| 263 | 263 | { |
| 264 | - $this->dms[ $dm->getId() ] = $dm; |
|
| 264 | + $this->dms[$dm->getId()] = $dm; |
|
| 265 | 265 | } |
| 266 | 266 | |
| 267 | 267 | /** |
@@ -397,7 +397,7 @@ discard block |
||
| 397 | 397 | break; |
| 398 | 398 | |
| 399 | 399 | case 'channel_created': |
| 400 | - $this->getChannelById($payload['channel']['id'])->then(function (Channel $channel) { |
|
| 400 | + $this->getChannelById($payload['channel']['id'])->then(function(Channel $channel) { |
|
| 401 | 401 | $this->channels[$channel->getId()] = $channel; |
| 402 | 402 | }); |
| 403 | 403 | break; |