Completed
Push — master ( ea20ea...a25393 )
by Timo
41s
created
src/Tidal/WampWatch/SessionMonitor.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -102,13 +102,13 @@  discard block
 block discarded – undo
102 102
     public function getSessionInfo($sessionId, callable $callback = null)
103 103
     {
104 104
         return $this->session->call(self::SESSION_INFO_TOPIC, [$sessionId])->then(
105
-            function ($res) use ($callback) {
105
+            function($res) use ($callback) {
106 106
                 $this->emit('info', [$res[0]]);
107 107
                 if ($callback !== null) {
108 108
                     $callback($res[0]);
109 109
                 }
110 110
             },
111
-            function ($error) {
111
+            function($error) {
112 112
                 $this->emit('error', [$error]);
113 113
             }
114 114
         );
@@ -203,25 +203,25 @@  discard block
 block discarded – undo
203 203
     protected function startSubscriptions()
204 204
     {
205 205
         // subscription to 'wamp.session.on_join'
206
-        $this->session->subscribe(self::SESSION_JOIN_TOPIC, function (array $res) {
206
+        $this->session->subscribe(self::SESSION_JOIN_TOPIC, function(array $res) {
207 207
             $sessionInfo = $res[0];
208 208
             if (!$this->validateSessionInfo($sessionInfo) || $this->hasSession($sessionInfo)) {
209 209
                 return;
210 210
             }
211 211
             $this->addSession($sessionInfo);
212
-        })->then(function ($msg) {
212
+        })->then(function($msg) {
213 213
             $this->joinSubscriptionId = $msg->getSubscriptionId();
214 214
             $this->checkStarted();
215 215
         });
216 216
 
217 217
         // subscription to 'wamp.session.on_leave'
218
-        $this->session->subscribe(self::SESSION_LEAVE_TOPIC, function (array $res) {
218
+        $this->session->subscribe(self::SESSION_LEAVE_TOPIC, function(array $res) {
219 219
             // @bug : wamp.session.on_leave is bugged as of crossbar.io 0.11.0
220 220
             // will provide sessionID when Browser closes/reloads,
221 221
             // but not when calling connection.close();
222 222
             $sessionId = (int) $res[0];
223 223
             $this->removeSessionId($sessionId);
224
-        })->then(function ($msg) {
224
+        })->then(function($msg) {
225 225
             $this->leaveSubscriptionId = $msg->getSubscriptionId();
226 226
             $this->checkStarted();
227 227
         });
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
     protected function retrieveSessionIds(callable $callback = null)
249 249
     {
250 250
         $this->session->call(self::SESSION_LIST_TOPIC, [])->then(
251
-            function ($res) use ($callback) {
251
+            function($res) use ($callback) {
252 252
                 // remove our own sessionID from the tracked sessions
253 253
                 $sessionIds = $this->removeOwnSessionId($res[0]);
254 254
                 $this->setList($sessionIds);
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
                 $this->calledList = true;
260 260
                 $this->checkStarted();
261 261
             },
262
-            function ($error) {
262
+            function($error) {
263 263
                 $this->emit('error', [$error]);
264 264
             }
265 265
         );
Please login to merge, or discard this patch.