Passed
Pull Request — master (#17)
by Michael
03:58
created
src/RealTimeClient.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $this->apiCall('rtm.start')
98 98
 
99 99
         // then connect to the socket...
100
-        ->then(function (Payload $response) {
100
+        ->then(function(Payload $response) {
101 101
             $responseData = $response->getData();
102 102
             // get the team info
103 103
             $this->team = new Team($this, $responseData['team']);
@@ -130,20 +130,20 @@  discard block
 block discarded – undo
130 130
         }, function($exception) use ($deferred) {
131 131
             // if connection was not successful
132 132
             $deferred->reject(new ConnectionException(
133
-                'Could not connect to Slack API: '. $exception->getMessage(),
133
+                'Could not connect to Slack API: '.$exception->getMessage(),
134 134
                 $exception->getCode()
135 135
             ));
136 136
         })
137 137
 
138 138
         // then wait for the connection to be ready.
139
-        ->then(function (WebSocket $socket) use ($deferred) {
139
+        ->then(function(WebSocket $socket) use ($deferred) {
140 140
             $this->websocket = $socket;
141 141
 
142
-            $this->once('hello', function () use ($deferred) {
142
+            $this->once('hello', function() use ($deferred) {
143 143
                 $deferred->resolve();
144 144
             });
145 145
 
146
-            $this->once('error', function ($data) use ($deferred) {
146
+            $this->once('error', function($data) use ($deferred) {
147 147
                 $deferred->reject(new ConnectionException(
148 148
                     'Could not connect to WebSocket: '.$data['error']['msg'],
149 149
                     $data['error']['code']));
@@ -329,8 +329,8 @@  discard block
 block discarded – undo
329 329
      */
330 330
     private function newWebSocket($url)
331 331
     {
332
-        return $this->connector->__invoke($url)->then(function (WebSocket $socket) {
333
-            $socket->on('message', function ($data) {
332
+        return $this->connector->__invoke($url)->then(function(WebSocket $socket) {
333
+            $socket->on('message', function($data) {
334 334
                 // parse the message and get the event name
335 335
                 $this->onMessage(Payload::fromJson($data));
336 336
             });
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
                     break;
363 363
 
364 364
                 case 'channel_created':
365
-                    $this->getChannelById($payload['channel']['id'])->then(function (Channel $channel) {
365
+                    $this->getChannelById($payload['channel']['id'])->then(function(Channel $channel) {
366 366
                         $this->channels[$channel->getId()] = $channel;
367 367
                     });
368 368
                     break;
Please login to merge, or discard this patch.