@@ -260,7 +260,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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; |
@@ -20,7 +20,7 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -189,7 +189,7 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -13,7 +13,7 @@ |
||
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'); |