Completed
Push — master ( dab562...6c1204 )
by Brian
10:33 queued 08:40
created
src/wormling/phparia/Resources/Resource.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
      */
63 63
     public function once($event, callable $listener)
64 64
     {
65
-        $onceListener = function () use (&$onceListener, $event, $listener) {
65
+        $onceListener = function() use (&$onceListener, $event, $listener) {
66 66
             $this->removeListener($event, $onceListener);
67 67
 
68 68
             call_user_func_array($listener, func_get_args());
Please login to merge, or discard this patch.
src/wormling/phparia/Api/PlaybackList.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         parent::offsetSet($offset, $value);
49 49
 
50 50
         // Remove playbacks when they are done playing
51
-        $value->oncePlaybackFinished(function (PlaybackFinished $playbackFinished) use ($value) {
51
+        $value->oncePlaybackFinished(function(PlaybackFinished $playbackFinished) use ($value) {
52 52
             if ($playbackFinished->getPlayback()->getId() === $value->getId()) {
53 53
                 $key = array_search($value, $this->getArrayCopy());
54 54
                 if ($key !== false) {
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
         // Remove playbacks when they are done playing
72 72
         $this->phparia->getWsClient()->once('PlaybackFinished',
73
-            function (PlaybackFinished $playbackFinished) use ($value) {
73
+            function(PlaybackFinished $playbackFinished) use ($value) {
74 74
                 if ($playbackFinished->getPlayback()->getId() === $value->getId()) {
75 75
                     $key = array_search($value, $this->getArrayCopy());
76 76
                     if ($key !== false) {
Please login to merge, or discard this patch.
src/wormling/phparia/Resources/ConfigInfo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
         $this->default_language = $this->getResponseValue('default_language');
114 114
         $this->max_channels = $this->getResponseValue('max_channels');
115 115
         $this->max_load = $this->getResponseValue('max_load');
116
-        $this->max_open_files =$this->getResponseValue('max_open_files');
116
+        $this->max_open_files = $this->getResponseValue('max_open_files');
117 117
         $this->name = $this->getResponseValue('name');
118 118
         $this->setid = $this->getResponseValue('setid', '\phparia\Resources\SetId');
119 119
     }
Please login to merge, or discard this patch.
src/wormling/phparia/Client/AmiClient.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -76,17 +76,17 @@
 block discarded – undo
76 76
         $factory = new Factory($this->eventLoop);
77 77
 
78 78
         return $factory->createClient($address)
79
-            ->then(function (Client $client) {
79
+            ->then(function(Client $client) {
80 80
                 $this->amiClient = $client;
81 81
                 $this->actionSender = new ActionSender($client);
82 82
                 $this->actionSender->events(true);
83
-                $client->on('close', function () {
83
+                $client->on('close', function() {
84 84
                     $this->logger->debug('AMI connection closed');
85 85
                 });
86
-                $client->on('event', function (Event $event) {
86
+                $client->on('event', function(Event $event) {
87 87
                     $this->wsClient->emit($event->getName(), (array)$event);
88 88
                 });
89
-            }, function (\Exception $e) {
89
+            }, function(\Exception $e) {
90 90
                 $this->logger->err('Connection error: '.$e->getMessage());
91 91
             });
92 92
     }
Please login to merge, or discard this patch.
src/wormling/phparia/Client/Phparia.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,8 +113,8 @@
 block discarded – undo
113 113
 
114 114
         $onStop = $this->onStop;
115 115
         $onStop()
116
-            ->then(function () use (&$deferred) {
117
-                $this->ariClient->onClose(function () use (&$deferred) {
116
+            ->then(function() use (&$deferred) {
117
+                $this->ariClient->onClose(function() use (&$deferred) {
118 118
                     $this->eventLoop->stop();
119 119
                     $deferred->resolve();
120 120
                 });
Please login to merge, or discard this patch.
src/wormling/phparia/Client/AriClient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@
 block discarded – undo
162 162
 
163 163
         $this->wsClient = new WebSocket($address, $this->eventLoop, $this->logger, $streamOptions);
164 164
 
165
-        $this->wsClient->on("message", function (WebSocketMessage $rawMessage) {
165
+        $this->wsClient->on("message", function(WebSocketMessage $rawMessage) {
166 166
             $message = new Message($rawMessage->getData());
167 167
 
168 168
             $eventType = '\\phparia\\Events\\'.$message->getType();
Please login to merge, or discard this patch.
src/wormling/phparia/Resources/Channel.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
      */
143 143
     public function onStasisEnd(callable $callback)
144 144
     {
145
-        $this->on(Event::STASIS_END . '_' . $this->getId(), $callback);
145
+        $this->on(Event::STASIS_END.'_'.$this->getId(), $callback);
146 146
     }
147 147
 
148 148
     /**
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      */
151 151
     public function onceStasisEnd(callable $callback)
152 152
     {
153
-        $this->once(Event::STASIS_END . '_' . $this->getId(), $callback);
153
+        $this->once(Event::STASIS_END.'_'.$this->getId(), $callback);
154 154
     }
155 155
 
156 156
     /**
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
      */
159 159
     public function onStasisStart(callable $callback)
160 160
     {
161
-        $this->on(Event::STASIS_START . '_' . $this->getId(), $callback);
161
+        $this->on(Event::STASIS_START.'_'.$this->getId(), $callback);
162 162
     }
163 163
 
164 164
     /**
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
      */
167 167
     public function onceStasisStart(callable $callback)
168 168
     {
169
-        $this->once(Event::STASIS_START . '_' . $this->getId(), $callback);
169
+        $this->once(Event::STASIS_START.'_'.$this->getId(), $callback);
170 170
     }
171 171
 
172 172
     /**
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
      */
175 175
     public function onChannelCallerId(callable $callback)
176 176
     {
177
-        $this->on(Event::CHANNEL_CALLER_ID . '_' . $this->getId(), $callback);
177
+        $this->on(Event::CHANNEL_CALLER_ID.'_'.$this->getId(), $callback);
178 178
     }
179 179
 
180 180
     /**
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
      */
183 183
     public function onceChannelCallerId(callable $callback)
184 184
     {
185
-        $this->once(Event::CHANNEL_CALLER_ID . '_' . $this->getId(), $callback);
185
+        $this->once(Event::CHANNEL_CALLER_ID.'_'.$this->getId(), $callback);
186 186
     }
187 187
 
188 188
     /**
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
      */
191 191
     public function onChannelCreated(callable $callback)
192 192
     {
193
-        $this->on(Event::CHANNEL_CREATED . '_' . $this->getId(), $callback);
193
+        $this->on(Event::CHANNEL_CREATED.'_'.$this->getId(), $callback);
194 194
     }
195 195
 
196 196
     /**
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
      */
199 199
     public function onceChannelCreated(callable $callback)
200 200
     {
201
-        $this->once(Event::CHANNEL_CREATED . '_' . $this->getId(), $callback);
201
+        $this->once(Event::CHANNEL_CREATED.'_'.$this->getId(), $callback);
202 202
     }
203 203
 
204 204
     /**
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
      */
207 207
     public function onChannelDestroyed(callable $callback)
208 208
     {
209
-        $this->on(Event::CHANNEL_DESTROYED . '_' . $this->getId(), $callback);
209
+        $this->on(Event::CHANNEL_DESTROYED.'_'.$this->getId(), $callback);
210 210
     }
211 211
 
212 212
     /**
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
      */
215 215
     public function onceChannelDestroyed(callable $callback)
216 216
     {
217
-        $this->once(Event::CHANNEL_DESTROYED . '_' . $this->getId(), $callback);
217
+        $this->once(Event::CHANNEL_DESTROYED.'_'.$this->getId(), $callback);
218 218
     }
219 219
 
220 220
     /**
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
      */
223 223
     public function removeChannelDestroyedListener(callable $callback)
224 224
     {
225
-        $this->removeListener(Event::CHANNEL_DESTROYED . '_' . $this->getId(), $callback);
225
+        $this->removeListener(Event::CHANNEL_DESTROYED.'_'.$this->getId(), $callback);
226 226
     }
227 227
 
228 228
     /**
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
      */
231 231
     public function onChannelDialplan(callable $callback)
232 232
     {
233
-        $this->on(Event::CHANNEL_DIALPLAN . '_' . $this->getId(), $callback);
233
+        $this->on(Event::CHANNEL_DIALPLAN.'_'.$this->getId(), $callback);
234 234
     }
235 235
 
236 236
     /**
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
      */
239 239
     public function onceChannelDialplan(callable $callback)
240 240
     {
241
-        $this->once(Event::CHANNEL_DIALPLAN . '_' . $this->getId(), $callback);
241
+        $this->once(Event::CHANNEL_DIALPLAN.'_'.$this->getId(), $callback);
242 242
     }
243 243
 
244 244
     /**
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
      */
247 247
     public function onChannelDtmfReceived(callable $callback)
248 248
     {
249
-        $this->on(Event::CHANNEL_DTMF_RECEIVED . '_' . $this->getId(), $callback);
249
+        $this->on(Event::CHANNEL_DTMF_RECEIVED.'_'.$this->getId(), $callback);
250 250
     }
251 251
 
252 252
     /**
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
      */
255 255
     public function onceChannelDtmfReceived(callable $callback)
256 256
     {
257
-        $this->once(Event::CHANNEL_DTMF_RECEIVED . '_' . $this->getId(), $callback);
257
+        $this->once(Event::CHANNEL_DTMF_RECEIVED.'_'.$this->getId(), $callback);
258 258
     }
259 259
 
260 260
     /**
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
      */
263 263
     public function onChannelEnteredBridge(callable $callback)
264 264
     {
265
-        $this->on(Event::CHANNEL_ENTERED_BRIDGE . '_' . $this->getId(), $callback);
265
+        $this->on(Event::CHANNEL_ENTERED_BRIDGE.'_'.$this->getId(), $callback);
266 266
     }
267 267
 
268 268
     /**
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
      */
271 271
     public function onceChannelEnteredBridge(callable $callback)
272 272
     {
273
-        $this->once(Event::CHANNEL_ENTERED_BRIDGE . '_' . $this->getId(), $callback);
273
+        $this->once(Event::CHANNEL_ENTERED_BRIDGE.'_'.$this->getId(), $callback);
274 274
     }
275 275
 
276 276
     /**
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
      */
279 279
     public function onChannelHangupRequest(callable $callback)
280 280
     {
281
-        $this->on(Event::CHANNEL_HANGUP_REQUEST . '_' . $this->getId(), $callback);
281
+        $this->on(Event::CHANNEL_HANGUP_REQUEST.'_'.$this->getId(), $callback);
282 282
     }
283 283
 
284 284
     /**
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
      */
287 287
     public function onceChannelHangupRequest(callable $callback)
288 288
     {
289
-        $this->once(Event::CHANNEL_HANGUP_REQUEST . '_' . $this->getId(), $callback);
289
+        $this->once(Event::CHANNEL_HANGUP_REQUEST.'_'.$this->getId(), $callback);
290 290
     }
291 291
 
292 292
     /**
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
      */
295 295
     public function onChannelLeftBridge(callable $callback)
296 296
     {
297
-        $this->on(Event::CHANNEL_LEFT_BRIDGE . '_' . $this->getId(), $callback);
297
+        $this->on(Event::CHANNEL_LEFT_BRIDGE.'_'.$this->getId(), $callback);
298 298
     }
299 299
 
300 300
     /**
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
      */
303 303
     public function onceChannelLeftBridge(callable $callback)
304 304
     {
305
-        $this->once(Event::CHANNEL_LEFT_BRIDGE . '_' . $this->getId(), $callback);
305
+        $this->once(Event::CHANNEL_LEFT_BRIDGE.'_'.$this->getId(), $callback);
306 306
     }
307 307
 
308 308
     /**
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
      */
311 311
     public function onChannelStateChange(callable $callback)
312 312
     {
313
-        $this->on(Event::CHANNEL_STATE_CHANGE . '_' . $this->getId(), $callback);
313
+        $this->on(Event::CHANNEL_STATE_CHANGE.'_'.$this->getId(), $callback);
314 314
     }
315 315
 
316 316
     /**
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
      */
319 319
     public function onceChannelStateChange(callable $callback)
320 320
     {
321
-        $this->once(Event::CHANNEL_STATE_CHANGE . '_' . $this->getId(), $callback);
321
+        $this->once(Event::CHANNEL_STATE_CHANGE.'_'.$this->getId(), $callback);
322 322
     }
323 323
 
324 324
     /**
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
      */
327 327
     public function onChannelHold(callable $callback)
328 328
     {
329
-        $this->on(Event::CHANNEL_HOLD . '_' . $this->getId(), $callback);
329
+        $this->on(Event::CHANNEL_HOLD.'_'.$this->getId(), $callback);
330 330
     }
331 331
 
332 332
     /**
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
      */
335 335
     public function onceChannelHold(callable $callback)
336 336
     {
337
-        $this->once(Event::CHANNEL_HOLD . '_' . $this->getId(), $callback);
337
+        $this->once(Event::CHANNEL_HOLD.'_'.$this->getId(), $callback);
338 338
     }
339 339
 
340 340
     /**
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
      */
343 343
     public function onChannelUnhold(callable $callback)
344 344
     {
345
-        $this->on(Event::CHANNEL_UNHOLD . '_' . $this->getId(), $callback);
345
+        $this->on(Event::CHANNEL_UNHOLD.'_'.$this->getId(), $callback);
346 346
     }
347 347
 
348 348
     /**
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
      */
351 351
     public function onceChanneUnhold(callable $callback)
352 352
     {
353
-        $this->once(Event::CHANNEL_UNHOLD . '_' . $this->getId(), $callback);
353
+        $this->once(Event::CHANNEL_UNHOLD.'_'.$this->getId(), $callback);
354 354
     }
355 355
 
356 356
     /**
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
      */
359 359
     public function onChannelTalkingFinished(callable $callback)
360 360
     {
361
-        $this->on(Event::CHANNEL_TALKING_FINISHED . '_' . $this->getId(), $callback);
361
+        $this->on(Event::CHANNEL_TALKING_FINISHED.'_'.$this->getId(), $callback);
362 362
     }
363 363
 
364 364
     /**
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
      */
367 367
     public function onceChannelTalkingFinished(callable $callback)
368 368
     {
369
-        $this->once(Event::CHANNEL_TALKING_FINISHED . '_' . $this->getId(), $callback);
369
+        $this->once(Event::CHANNEL_TALKING_FINISHED.'_'.$this->getId(), $callback);
370 370
     }
371 371
 
372 372
     /**
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
      */
375 375
     public function onChannelTalkingStarted(callable $callback)
376 376
     {
377
-        $this->on(Event::CHANNEL_TALKING_STARTED . '_' . $this->getId(), $callback);
377
+        $this->on(Event::CHANNEL_TALKING_STARTED.'_'.$this->getId(), $callback);
378 378
     }
379 379
 
380 380
     /**
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
      */
383 383
     public function onceChannelTalkingStarted(callable $callback)
384 384
     {
385
-        $this->once(Event::CHANNEL_TALKING_STARTED . '_' . $this->getId(), $callback);
385
+        $this->once(Event::CHANNEL_TALKING_STARTED.'_'.$this->getId(), $callback);
386 386
     }
387 387
 
388 388
     /**
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
      */
391 391
     public function onChannelUserevent(callable $callback)
392 392
     {
393
-        $this->on(Event::CHANNEL_USEREVENT . '_' . $this->getId(), $callback);
393
+        $this->on(Event::CHANNEL_USEREVENT.'_'.$this->getId(), $callback);
394 394
     }
395 395
 
396 396
     /**
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
      */
399 399
     public function onceChannelUserevent(callable $callback)
400 400
     {
401
-        $this->once(Event::CHANNEL_USEREVENT . '_' . $this->getId(), $callback);
401
+        $this->once(Event::CHANNEL_USEREVENT.'_'.$this->getId(), $callback);
402 402
     }
403 403
 
404 404
     /**
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
      */
407 407
     public function onChannelVarset(callable $callback)
408 408
     {
409
-        $this->on(Event::CHANNEL_VARSET . '_' . $this->getId(), $callback);
409
+        $this->on(Event::CHANNEL_VARSET.'_'.$this->getId(), $callback);
410 410
     }
411 411
 
412 412
     /**
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
      */
415 415
     public function onceChannelVarset(callable $callback)
416 416
     {
417
-        $this->once(Event::CHANNEL_VARSET . '_' . $this->getId(), $callback);
417
+        $this->once(Event::CHANNEL_VARSET.'_'.$this->getId(), $callback);
418 418
     }
419 419
 
420 420
     /**
Please login to merge, or discard this patch.