Completed
Branch master (8e085e)
by Timo
02:38
created
src/Tidal/WampWatch/SessionMonitor.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
67 67
     public function getSessionInfo($sessionId, callable $callback = null)
68 68
     {
69 69
         return $this->session->call(self::SESSION_INFO_TOPIC, [$sessionId])->then(
70
-            function ($res) use ($callback) {
70
+            function($res) use ($callback) {
71 71
                 $this->emit('info', [$res[0]]);
72 72
                 if ($callback !== null) {
73 73
                     $callback($res[0]);
74 74
                 }
75 75
             },
76
-            function ($error) {
76
+            function($error) {
77 77
                 $this->emit('error', [$error]);
78 78
             }
79 79
         );
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         // @var \Tidal\WampWatch\Subscription\Collection
171 171
         $collection = $this->getSubscriptionCollection();
172 172
 
173
-        $collection->addSubscription(self::SESSION_JOIN_TOPIC, function (array $res) {
173
+        $collection->addSubscription(self::SESSION_JOIN_TOPIC, function(array $res) {
174 174
             $sessionInfo = $res[0];
175 175
             if (!$this->validateSessionInfo($sessionInfo) || $this->hasSession($sessionInfo)) {
176 176
                 return;
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
             $this->addSession($sessionInfo);
179 179
         });
180 180
 
181
-        $collection->addSubscription(self::SESSION_LEAVE_TOPIC, function (array $res) {
181
+        $collection->addSubscription(self::SESSION_LEAVE_TOPIC, function(array $res) {
182 182
             // @bug : wamp.session.on_leave is bugged as of crossbar.io 0.11.0
183 183
             // will provide sessionID when Browser closes/reloads,
184 184
             // but not when calling connection.close();
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         $this->session->call(self::SESSION_LIST_TOPIC, [])
200 200
             ->then(
201 201
                 $this->getSessionIdRetrievalCallback()
202
-            )->done(function ($res) use ($callback) {
202
+            )->done(function($res) use ($callback) {
203 203
                 if ($callback !== null) {
204 204
                     $callback($res);
205 205
                 }
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 
209 209
     protected function getSessionIdRetrievalCallback()
210 210
     {
211
-        return function ($res) {
211
+        return function($res) {
212 212
             // remove our own sessionID from the tracked sessions
213 213
             $sessionIds = $this->removeOwnSessionId($res[0]);
214 214
             $this->setList($sessionIds);
Please login to merge, or discard this patch.
src/Tidal/WampWatch/MonitorTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function start()
76 76
     {
77
-        $this->getSubscriptionCollection()->subscribe()->done(function () {
77
+        $this->getSubscriptionCollection()->subscribe()->done(function() {
78 78
             $this->checkStarted();
79 79
         });
80
-        $this->callInitialProcedure()->done(function () {
80
+        $this->callInitialProcedure()->done(function() {
81 81
             $this->checkStarted();
82 82
         });
83 83
 
@@ -152,14 +152,14 @@  discard block
 block discarded – undo
152 152
     {
153 153
         if (!isset($this->initialCallProcedure) || !isset($this->initialCallCallback)) {
154 154
             $this->initialCallDone = true;
155
-            $resolver = function (callable $resolve) {
155
+            $resolver = function(callable $resolve) {
156 156
                 $resolve();
157 157
             };
158 158
 
159 159
             return new  Promise($resolver);
160 160
         }
161 161
 
162
-        return $this->session->call($this->initialCallProcedure, [])->then(function ($res) {
162
+        return $this->session->call($this->initialCallProcedure, [])->then(function($res) {
163 163
             $this->initialCallDone = true;
164 164
             $cb = $this->initialCallCallback;
165 165
             $cb($res);
Please login to merge, or discard this patch.