Passed
Branch master (f0dc77)
by Jacobo
06:21 queued 03:13
created
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.
database/migrations/2019_12_01_000001_create_openvidu_cache_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('openvidu_cache', function (Blueprint $table) {
16
+        Schema::create('openvidu_cache', function(Blueprint $table) {
17 17
             $table->string('key')->unique();
18 18
             $table->text('value');
19 19
             $table->integer('expiration');
Please login to merge, or discard this patch.
src/Session.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
         switch ($response->getStatusCode()) {
210 210
             case 204:
211 211
                 $connectionClosed = null;
212
-                $this->activeConnections = array_filter($this->activeConnections, function (Connection $connection) use ($connectionId) {
212
+                $this->activeConnections = array_filter($this->activeConnections, function(Connection $connection) use ($connectionId) {
213 213
                     if ($connection->getConnectionId() !== $connectionId) {
214 214
                         return true;
215 215
                     } else {
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
                 if ($connectionClosed != null) {
222 222
                     foreach ($connectionClosed->getPublishers() as $publisher) {
223 223
                         foreach ($this->activeConnections as $con) {
224
-                            $con->subscribers = array_filter($con->subscribers, function ($subscriber) use ($publisher) {
224
+                            $con->subscribers = array_filter($con->subscribers, function($subscriber) use ($publisher) {
225 225
                                 if (is_array($subscriber) && array_key_exists('streamId', $subscriber)) {
226 226
                                     // Subscriber with advanced webRtc configuration properties
227 227
                                     return $subscriber['streamId'] !== $publisher->getStreamId();
@@ -281,12 +281,12 @@  discard block
 block discarded – undo
281 281
         switch ($response->getStatusCode()) {
282 282
             case 204:
283 283
                 foreach ($this->activeConnections as $connection) {
284
-                    $connection->publishers = array_filter($connection->publishers, function (array $publisher) use ($streamId) {
284
+                    $connection->publishers = array_filter($connection->publishers, function(array $publisher) use ($streamId) {
285 285
                         return $streamId !== $publisher->getStreamId();
286 286
                     });
287 287
 
288 288
                     if ($connection->subscribers && count($connection->subscribers) > 0) {
289
-                        $connection->subscribers = array_filter($connection->subscribers, function (array $subscriber) use ($streamId) {
289
+                        $connection->subscribers = array_filter($connection->subscribers, function(array $subscriber) use ($streamId) {
290 290
                             if (array_key_exists('streamId', $subscriber)) {
291 291
                                 // Subscriber with advanced webRtc configuration properties
292 292
                                 return $subscriber['streamId'] !== $streamId;
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
         $JSONSession = json_decode($json);
433 433
         $this->sessionId = $JSONSession->sessionId;
434 434
         $this->createdAt = isset($JSONSession->createdAt) ? $JSONSession->createdAt : null;
435
-        $this->recording = isset($JSONSession->recording) ? $this->recording : null;;
435
+        $this->recording = isset($JSONSession->recording) ? $this->recording : null; ;
436 436
 
437 437
         if (isset($JSONSession->properties)) {
438 438
             $this->properties = new SessionProperties($JSONSession->properties->mediaMode, $JSONSession->properties->recordingMode, $JSONSession->properties->defaultOutputMode, isset($JSONSession->properties->defaultRecordingLayout) ? $JSONSession->properties->defaultRecordingLayout : null,
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
                 }
457 457
                 $this->activeConnections[] = new Connection($content->connectionId, $content->createdAt, $content->role, $content->token, $content->location, $content->platform, $content->serverData, $content->clientData, $publishers, $subscribers);
458 458
             }
459
-            usort($this->activeConnections[], function ($a, $b) {
459
+            usort($this->activeConnections[], function($a, $b) {
460 460
                 if ($a->createdAt > $b->createdAt) {
461 461
                     return 1;
462 462
                 }
Please login to merge, or discard this patch.