Test Setup Failed
Branch master (7abbc2)
by Jacobo
04:36
created
src/Session.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
         $JSONSession = json_decode($json);
261 261
         $this->sessionId = $JSONSession->sessionId;
262 262
         $this->createdAt = isset($JSONSession->createdAt) ? $JSONSession->createdAt : null;
263
-        $this->recording = isset($JSONSession->recording) ? $this->recording : null;;
263
+        $this->recording = isset($JSONSession->recording) ? $this->recording : null; ;
264 264
 
265 265
         if (isset($JSONSession->properties)) {
266 266
             $this->properties = new SessionProperties($JSONSession->properties->mediaMode, $JSONSession->properties->recordingMode, $JSONSession->properties->defaultOutputMode, isset($JSONSession->properties->defaultRecordingLayout) ? $JSONSession->properties->defaultRecordingLayout : null,
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
                 }
285 285
                 $this->activeConnections[] = new Connection($content->connectionId, $content->createdAt, $content->role, $content->token, $content->location, $content->platform, $content->serverData, $content->clientData, $publishers, $subscribers);
286 286
             }
287
-            usort($this->activeConnections[], function ($a, $b) {
287
+            usort($this->activeConnections[], function($a, $b) {
288 288
                 ($a->createdAt > $b->createdAt) ? 1 : ($b->createdAt > $a->createdAt) ? -1 : 0;
289 289
             });
290 290
         }
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
         switch ($response->getStatusCode()) {
314 314
             case 204:
315 315
                 $connectionClosed = null;
316
-                $this->activeConnections = array_filter($this->activeConnections, function (Connection $connection) use ($connectionId) {
316
+                $this->activeConnections = array_filter($this->activeConnections, function(Connection $connection) use ($connectionId) {
317 317
                     if ($connection->getConnectionId() !== $connectionId) {
318 318
                         return true;
319 319
                     } else {
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
                 if ($connectionClosed != null) {
326 326
                     foreach ($connectionClosed->publishers as $publisher) {
327 327
                         foreach ($this->activeConnections as $con) {
328
-                            $con->subscribers = array_filter($con->subscribers, function ($subscriber) use ($publisher) {
328
+                            $con->subscribers = array_filter($con->subscribers, function($subscriber) use ($publisher) {
329 329
                                 if (is_array($subscriber) && array_key_exists('streamId', $subscriber)) {
330 330
                                     // Subscriber with advanced webRtc configuration properties
331 331
                                     return $subscriber['streamId'] !== $publisher->streamId;
@@ -383,12 +383,12 @@  discard block
 block discarded – undo
383 383
         switch ($response->getStatusCode()) {
384 384
             case 204:
385 385
                 foreach ($this->activeConnections as $connection) {
386
-                    $connection->publishers = array_filter($connection->publishers, function (array $publisher) use ($streamId) {
386
+                    $connection->publishers = array_filter($connection->publishers, function(array $publisher) use ($streamId) {
387 387
                         return $streamId !== $publisher->streamId;
388 388
                     });
389 389
 
390 390
                     if ($connection->subscribers && count($connection->subscribers) > 0) {
391
-                        $connection->subscribers = array_filter($connection->subscribers, function (array $subscriber) use ($streamId) {
391
+                        $connection->subscribers = array_filter($connection->subscribers, function(array $subscriber) use ($streamId) {
392 392
                             if (array_key_exists('streamId', $subscriber)) {
393 393
                                 // Subscriber with advanced webRtc configuration properties
394 394
                                 return $subscriber['streamId'] !== $streamId;
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -245,8 +245,9 @@
 block discarded – undo
245 245
         }
246 246
 
247 247
         foreach ($array as $key => $value) {
248
-            if (is_null($value) || $value == '')
249
-                unset($array[$key]);
248
+            if (is_null($value) || $value == '') {
249
+                            unset($array[$key]);
250
+            }
250 251
         }
251 252
         return $array;
252 253
     }
Please login to merge, or discard this patch.
src/Publisher.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -216,8 +216,9 @@
 block discarded – undo
216 216
             'typeOfVideo' => $this->typeOfVideo,
217 217
             'videoDimensions' => $this->videoDimensions];
218 218
         foreach ($array as $key => $value) {
219
-            if (is_null($value) || $value == '')
220
-                unset($array[$key]);
219
+            if (is_null($value) || $value == '') {
220
+                            unset($array[$key]);
221
+            }
221 222
         }
222 223
         return $array;
223 224
     }
Please login to merge, or discard this patch.
src/SessionProperties.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -146,8 +146,9 @@
 block discarded – undo
146 146
             'defaultCustomLayout' => $this->defaultCustomLayout,
147 147
             'customSessionId' => $this->customSessionId];
148 148
         foreach ($array as $key => $value) {
149
-            if (is_null($value) || $value == '')
150
-                unset($array[$key]);
149
+            if (is_null($value) || $value == '') {
150
+                            unset($array[$key]);
151
+            }
151 152
         }
152 153
         return $array;
153 154
     }
Please login to merge, or discard this patch.
src/Recording.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -190,8 +190,9 @@
 block discarded – undo
190 190
     {
191 191
         $array = ['id' => $this->id, 'sessionId' => $this->sessionId, 'size' => $this->size, 'status' => $this->status, 'duration' => $this->duration, 'resolution' => $this->getResolution(), 'hasAudio' => $this->hasAudio(), 'hasVideo' => $this->hasVideo(), 'url' => $this->url, 'createdAt' => $this->createdAt];
192 192
         foreach ($array as $key => $value) {
193
-            if (is_null($value) || $value == '')
194
-                unset($array[$key]);
193
+            if (is_null($value) || $value == '') {
194
+                            unset($array[$key]);
195
+            }
195 196
         }
196 197
         return $array;
197 198
     }
Please login to merge, or discard this patch.
src/TokenOptions.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,9 @@
 block discarded – undo
60 60
     {
61 61
         $array = ['role' => $this->role, 'data' => $this->data];
62 62
         foreach ($array as $key => $value) {
63
-            if (is_null($value) || $value == '')
64
-                unset($array[$key]);
63
+            if (is_null($value) || $value == '') {
64
+                            unset($array[$key]);
65
+            }
65 66
         }
66 67
         return $array;
67 68
     }
Please login to merge, or discard this patch.
src/Connection.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -228,8 +228,9 @@
 block discarded – undo
228 228
 
229 229
 
230 230
         foreach ($array as $key => $value) {
231
-            if (is_null($value) || $value == '')
232
-                unset($array[$key]);
231
+            if (is_null($value) || $value == '') {
232
+                            unset($array[$key]);
233
+            }
233 234
         }
234 235
         return $array;
235 236
     }
Please login to merge, or discard this patch.
src/Providers/OpenViduServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public function register()
22 22
     {
23
-        $this->app->singleton(OpenVidu::class, function ($app) {
23
+        $this->app->singleton(OpenVidu::class, function($app) {
24 24
             return new OpenVidu(config('services.openvidu'));
25 25
         });
26 26
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     private function registerRoutes()
37 37
     {
38
-        Route::group($this->routeConfiguration(), function () {
38
+        Route::group($this->routeConfiguration(), function() {
39 39
             $this->loadRoutesFrom(__DIR__ . '/../Http/routes.php');
40 40
         });
41 41
     }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             ], 'openvidu-migrations');
70 70
 
71 71
         }
72
-        Cache::extend('openvidu', function () {
72
+        Cache::extend('openvidu', function() {
73 73
             return Cache::repository(new SessionStore(DB::connection(), config('cache.stores.openvidu.table')));
74 74
         });
75 75
     }
Please login to merge, or discard this patch.
src/Cache/SessionStore.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
      */
190 190
     public function increment($key, $value = 1)
191 191
     {
192
-        return $this->incrementOrDecrement($key, $value, function ($current, $value) {
192
+        return $this->incrementOrDecrement($key, $value, function($current, $value) {
193 193
             return $current + $value;
194 194
         });
195 195
     }
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
      */
206 206
     protected function incrementOrDecrement($key, $value, Closure $callback)
207 207
     {
208
-        return $this->connection->transaction(function () use ($key, $value, $callback) {
208
+        return $this->connection->transaction(function() use ($key, $value, $callback) {
209 209
 
210 210
 
211 211
             $cache = $this->table()->where('key', $key)
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
      */
253 253
     public function decrement($key, $value = 1)
254 254
     {
255
-        return $this->incrementOrDecrement($key, $value, function ($current, $value) {
255
+        return $this->incrementOrDecrement($key, $value, function($current, $value) {
256 256
             return $current - $value;
257 257
         });
258 258
     }
Please login to merge, or discard this patch.
src/RecordingProperties.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -198,8 +198,9 @@
 block discarded – undo
198 198
             'resolution' => $this->resolution,
199 199
             'customLayout' => $this->customLayout];
200 200
         foreach ($array as $key => $value) {
201
-            if (is_null($value) || $value == '')
202
-                unset($array[$key]);
201
+            if (is_null($value) || $value == '') {
202
+                            unset($array[$key]);
203
+            }
203 204
         }
204 205
         return $array;
205 206
     }
Please login to merge, or discard this patch.