@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | public function getSubscriptionInfo($topic) |
64 | 64 | { |
65 | 65 | return $this->session->call(self::SUBSCRIPTION_GET_TOPIC, $topic)->then( |
66 | - function ($res) { |
|
66 | + function($res) { |
|
67 | 67 | $this->emit('info', [$res]); |
68 | 68 | |
69 | 69 | return $res; |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | return $this->retrieveSubscriptionIds(); |
79 | 79 | } |
80 | 80 | |
81 | - return new Promise(function (callable $resolve) { |
|
81 | + return new Promise(function(callable $resolve) { |
|
82 | 82 | $resolve($this->subscriptionIds); |
83 | 83 | }); |
84 | 84 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | private function getCreateHandler() |
103 | 103 | { |
104 | - return function ($res) { |
|
104 | + return function($res) { |
|
105 | 105 | $sessionId = $res[0]; |
106 | 106 | $subscriptionInfo = $res[1]; |
107 | 107 | $this->emit('create', [$sessionId, $subscriptionInfo]); |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | |
111 | 111 | private function getSubscriptionHandler($event) |
112 | 112 | { |
113 | - return function ($res) use ($event) { |
|
113 | + return function($res) use ($event) { |
|
114 | 114 | $sessionId = $res[0]; |
115 | 115 | $subscriptionId = $res[1]; |
116 | 116 | $this->emit($event, [$sessionId, $subscriptionId]); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | |
139 | 139 | protected function getSubscriptionIdRetrievalCallback() |
140 | 140 | { |
141 | - return function ($res) { |
|
141 | + return function($res) { |
|
142 | 142 | $this->setList($res); |
143 | 143 | $this->emit('list', [ |
144 | 144 | $this->subscriptionIds->exact, |
@@ -67,12 +67,12 @@ discard block |
||
67 | 67 | public function getSessionInfo($sessionId) |
68 | 68 | { |
69 | 69 | return $this->session->call(self::SESSION_INFO_TOPIC, [$sessionId])->then( |
70 | - function ($res) { |
|
70 | + function($res) { |
|
71 | 71 | $this->emit('info', [$res]); |
72 | 72 | |
73 | 73 | return $res; |
74 | 74 | }, |
75 | - function ($error) { |
|
75 | + function($error) { |
|
76 | 76 | $this->emit('error', [$error]); |
77 | 77 | } |
78 | 78 | ); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | return $this->retrieveSessionIds(); |
92 | 92 | } |
93 | 93 | |
94 | - return new Promise(function (callable $resolve) { |
|
94 | + return new Promise(function(callable $resolve) { |
|
95 | 95 | $resolve($this->sessionIds); |
96 | 96 | }); |
97 | 97 | } |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | // @var \Tidal\WampWatch\Subscription\Collection |
168 | 168 | $collection = $this->getMetaSubscriptionCollection(); |
169 | 169 | |
170 | - $collection->addSubscription(self::SESSION_JOIN_TOPIC, function (array $res) { |
|
170 | + $collection->addSubscription(self::SESSION_JOIN_TOPIC, function(array $res) { |
|
171 | 171 | $sessionInfo = $res[0]; |
172 | 172 | if (!$this->validateSessionInfo($sessionInfo) || $this->hasSession($sessionInfo)) { |
173 | 173 | return; |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | $this->addSession($sessionInfo); |
176 | 176 | }); |
177 | 177 | |
178 | - $collection->addSubscription(self::SESSION_LEAVE_TOPIC, function (array $res) { |
|
178 | + $collection->addSubscription(self::SESSION_LEAVE_TOPIC, function(array $res) { |
|
179 | 179 | // @bug : wamp.session.on_leave is bugged as of crossbar.io 0.11.0 |
180 | 180 | // will provide sessionID when Browser closes/reloads, |
181 | 181 | // but not when calling connection.close(); |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | |
203 | 203 | protected function getSessionIdRetrievalCallback() |
204 | 204 | { |
205 | - return function ($res) { |
|
205 | + return function($res) { |
|
206 | 206 | // remove our own sessionID from the tracked sessions |
207 | 207 | $sessionIds = $this->removeOwnSessionId($res[0]); |
208 | 208 | $this->setList($sessionIds); |
@@ -74,10 +74,10 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function start() |
76 | 76 | { |
77 | - $this->getMetaSubscriptionCollection()->subscribe()->done(function () { |
|
77 | + $this->getMetaSubscriptionCollection()->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 | |
@@ -160,14 +160,14 @@ discard block |
||
160 | 160 | { |
161 | 161 | if (!isset($this->initialCallProcedure) || !isset($this->initialCallCallback)) { |
162 | 162 | $this->initialCallDone = true; |
163 | - $resolver = function (callable $resolve) { |
|
163 | + $resolver = function(callable $resolve) { |
|
164 | 164 | $resolve(); |
165 | 165 | }; |
166 | 166 | |
167 | 167 | return new Promise($resolver); |
168 | 168 | } |
169 | 169 | |
170 | - return $this->session->call($this->initialCallProcedure, [])->then(function ($res) { |
|
170 | + return $this->session->call($this->initialCallProcedure, [])->then(function($res) { |
|
171 | 171 | $this->initialCallDone = true; |
172 | 172 | $cb = $this->initialCallCallback; |
173 | 173 | $cb($res); |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | |
204 | 204 | private function getErrorCallback() |
205 | 205 | { |
206 | - return function ($error) { |
|
206 | + return function($error) { |
|
207 | 207 | $this->emit('error', [$error]); |
208 | 208 | |
209 | 209 | return $error; |