@@ -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'); |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | switch ($response->getStatusCode()) { |
213 | 213 | case 204: |
214 | 214 | $connectionClosed = null; |
215 | - $this->activeConnections = array_filter($this->activeConnections, function (Connection $connection) use ($connectionId) { |
|
215 | + $this->activeConnections = array_filter($this->activeConnections, function(Connection $connection) use ($connectionId) { |
|
216 | 216 | if ($connection->getConnectionId() !== $connectionId) { |
217 | 217 | return true; |
218 | 218 | } else { |
@@ -421,11 +421,11 @@ discard block |
||
421 | 421 | public function fromArray(array $sessionArray): Session |
422 | 422 | { |
423 | 423 | $this->sessionId = $sessionArray['sessionId']; |
424 | - $this->createdAt = $sessionArray['createdAt'] ?? null; |
|
424 | + $this->createdAt = $sessionArray['createdAt'] ?? null; |
|
425 | 425 | $this->recording = $sessionArray['recording'] ?? null; |
426 | 426 | |
427 | 427 | if (array_key_exists('properties', $sessionArray)) { |
428 | - $this->properties = SessionPropertiesBuilder::build($sessionArray['properties']); |
|
428 | + $this->properties = SessionPropertiesBuilder::build($sessionArray['properties']); |
|
429 | 429 | } |
430 | 430 | |
431 | 431 | $this->activeConnections = []; |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | } |
443 | 443 | $this->activeConnections[] = ConnectionBuilder::build($ensure, $publishers, $subscribers); |
444 | 444 | } |
445 | - usort($this->activeConnections[], function ($a, $b) { |
|
445 | + usort($this->activeConnections[], function($a, $b) { |
|
446 | 446 | if ($a->createdAt > $b->createdAt) { |
447 | 447 | return 1; |
448 | 448 | } |
@@ -14,9 +14,9 @@ |
||
14 | 14 | $properties['createdAt'], |
15 | 15 | $properties['hasAudio'], |
16 | 16 | $properties['hasVideo'], |
17 | - $properties['audioActive'] , |
|
17 | + $properties['audioActive'], |
|
18 | 18 | $properties['videoActive'], |
19 | - $properties['frameRate'] , |
|
19 | + $properties['frameRate'], |
|
20 | 20 | $properties['typeOfVideo'], |
21 | 21 | $properties['videoDimensions'] |
22 | 22 | ); |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | */ |
188 | 188 | public function unpublish(string $streamId) |
189 | 189 | { |
190 | - $this->publishers = array_filter($this->publishers, function (Publisher $publisher) use ($streamId) { |
|
190 | + $this->publishers = array_filter($this->publishers, function(Publisher $publisher) use ($streamId) { |
|
191 | 191 | return $streamId !== $publisher->getStreamId(); |
192 | 192 | }); |
193 | 193 | } |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | public function unsubscribe(string $streamId) |
200 | 200 | { |
201 | 201 | if ($this->subscribers && count($this->subscribers) > 0) { |
202 | - $this->subscribers = array_filter($this->subscribers, function ($subscriber) use ($streamId) { |
|
202 | + $this->subscribers = array_filter($this->subscribers, function($subscriber) use ($streamId) { |
|
203 | 203 | if (is_string($subscriber)) { |
204 | 204 | return $subscriber !== $streamId; |
205 | 205 | } |