Passed
Push — master ( 8360b3...e0fba9 )
by Jacobo
03:15
created
src/Exceptions/OpenViduSessionNotFoundException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,6 +18,6 @@
 block discarded – undo
18 18
 
19 19
     public function __toString()
20 20
     {
21
-        return __CLASS__.":[{$this->code}]:{$this->message}\n";
21
+        return __CLASS__ . ":[{$this->code}]:{$this->message}\n";
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
src/Exceptions/OpenViduSessionCantCloseException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,6 +18,6 @@
 block discarded – undo
18 18
 
19 19
     public function __toString()
20 20
     {
21
-        return __CLASS__.":[{$this->code}]:{$this->message}\n";
21
+        return __CLASS__ . ":[{$this->code}]:{$this->message}\n";
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
src/Exceptions/OpenViduServerRecordingIsDisabledException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,6 +18,6 @@
 block discarded – undo
18 18
 
19 19
     public function __toString()
20 20
     {
21
-        return __CLASS__.":[{$this->code}]:{$this->message}\n";
21
+        return __CLASS__ . ":[{$this->code}]:{$this->message}\n";
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
src/Exceptions/OpenViduConnectionNotFoundException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,6 +18,6 @@
 block discarded – undo
18 18
 
19 19
     public function __toString()
20 20
     {
21
-        return __CLASS__.":[{$this->code}]:{$this->message}\n";
21
+        return __CLASS__ . ":[{$this->code}]:{$this->message}\n";
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
src/Session.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                 case 409:
75 75
                     return $this->properties->getCustomSessionId();
76 76
                 default:
77
-                    throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode());
77
+                    throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode());
78 78
             }
79 79
         } else {
80 80
             return $this->sessionId;
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         $this->getSessionId();
96 96
         try {
97 97
             if (!$tokenOptions) {
98
-                $tokenOptions = new TokenOptions(OpenViduRole::PUBLISHER);;
98
+                $tokenOptions = new TokenOptions(OpenViduRole::PUBLISHER); ;
99 99
             }
100 100
             $response = $this->client->post(Uri::TOKEN_URI, [
101 101
                 RequestOptions::JSON => array_merge($tokenOptions->toArray(), ['session' => $this->sessionId])
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function close()
115 115
     {
116
-        $response = $this->client->delete(Uri::SESSION_URI.'/'.$this->sessionId);
116
+        $response = $this->client->delete(Uri::SESSION_URI . '/' . $this->sessionId);
117 117
         switch ($response->getStatusCode()) {
118 118
             case 204:
119 119
                 Cache::store('openvidu')->forget($this->sessionId);
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                 throw new OpenViduSessionNotFoundException();
123 123
                 break;
124 124
             default:
125
-                throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode());
125
+                throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode());
126 126
         }
127 127
     }
128 128
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
     public function fetch()
146 146
     {
147
-        $response = $this->client->get(Uri::SESSION_URI.'/'.$this->sessionId, [
147
+        $response = $this->client->get(Uri::SESSION_URI . '/' . $this->sessionId, [
148 148
             'headers' => [
149 149
                 'Content-Type' => 'application/x-www-form-urlencoded',
150 150
                 'Accept' => 'application/json',
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
      */
259 259
     public function forceDisconnect(string $connectionId)
260 260
     {
261
-        $response = $this->client->delete(Uri::SESSION_URI.'/'.$this->sessionId.'/connection/'.$connectionId, [
261
+        $response = $this->client->delete(Uri::SESSION_URI . '/' . $this->sessionId . '/connection/' . $connectionId, [
262 262
             'headers' => [
263 263
                 'Content-Type' => 'application/x-www-form-urlencoded',
264 264
                 'Accept' => 'application/json',
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
                 throw new OpenViduConnectionNotFoundException();
277 277
                 break;
278 278
             default:
279
-                throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode());
279
+                throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode());
280 280
         }
281 281
     }
282 282
 
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
     private function leaveSession(string $connectionId)
290 290
     {
291 291
         $connectionClosed = null;
292
-        $this->activeConnections = array_filter($this->activeConnections, function (Connection $connection) use (&$connectionClosed, $connectionId) {
292
+        $this->activeConnections = array_filter($this->activeConnections, function(Connection $connection) use (&$connectionClosed, $connectionId) {
293 293
             if ($connection->getConnectionId() !== $connectionId) {
294 294
                 return true;
295 295
             }
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
      */
328 328
     public function forceUnpublish(string $streamId)
329 329
     {
330
-        $response = $this->client->delete(Uri::SESSION_URI.'/'.$this->sessionId.'/stream/'.$streamId, [
330
+        $response = $this->client->delete(Uri::SESSION_URI . '/' . $this->sessionId . '/stream/' . $streamId, [
331 331
             'headers' => [
332 332
                 'Content-Type' => 'application/x-www-form-urlencoded',
333 333
                 'Accept' => 'application/json',
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
                 throw new OpenViduConnectionNotFoundException();
349 349
                 break;
350 350
             default:
351
-                throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode());
351
+                throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode());
352 352
         }
353 353
     }
354 354
 
Please login to merge, or discard this patch.
src/Providers/OpenViduServiceProvider.php 1 patch
Spacing   +6 added lines, -6 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(/** @scrutinizer ignore-call */ config('services.openvidu'));
25 25
         });
26 26
 
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
      */
36 36
     private function registerRoutes()
37 37
     {
38
-        Route::group($this->routeConfiguration(), function () {
39
-            $this->loadRoutesFrom(__DIR__.'/../Http/routes.php');
38
+        Route::group($this->routeConfiguration(), function() {
39
+            $this->loadRoutesFrom(__DIR__ . '/../Http/routes.php');
40 40
         });
41 41
     }
42 42
 
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
     public function boot()
63 63
     {
64 64
         if ($this->app->runningInConsole()) {
65
-            $this->loadMigrationsFrom(__DIR__.'/../../database/migrations');
65
+            $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations');
66 66
 
67 67
             $this->publishes([
68
-                __DIR__.'/../../database/migrations' => /** @scrutinizer ignore-call */ database_path('migrations'),
68
+                __DIR__ . '/../../database/migrations' => /** @scrutinizer ignore-call */ database_path('migrations'),
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(), /** @scrutinizer ignore-call */ config('cache.stores.openvidu.table')));
74 74
         });
75 75
     }
Please login to merge, or discard this patch.
src/OpenVidu.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             'auth' => [
66 66
                 $this->config['app'], $this->config['secret']
67 67
             ],
68
-            'base_uri' => $this->config['domain'].':'.$this->config['port'],
68
+            'base_uri' => $this->config['domain'] . ':' . $this->config['port'],
69 69
             'debug' => $this->config['debug'],
70 70
             'http_errors' => false,
71 71
             'verify' => false
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
                 throw new OpenViduServerRecordingIsDisabledException();
116 116
                 break;
117 117
             default:
118
-                throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode());
118
+                throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode());
119 119
         }
120 120
     }
121 121
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      */
149 149
     public function stopRecording(string $recordingId): Recording
150 150
     {
151
-        $response = $this->client()->post(Uri::RECORDINGS_STOP.'/'.$recordingId);
151
+        $response = $this->client()->post(Uri::RECORDINGS_STOP . '/' . $recordingId);
152 152
         switch ($response->getStatusCode()) {
153 153
             case 200:
154 154
                 $recording = RecordingBuilder::build(json_decode($response->getBody()->getContents(), true));
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
                 throw new OpenViduRecordingStatusException("The recording has `starting` status. Wait until `started` status before stopping the recording.");
165 165
                 break;
166 166
             default:
167
-                throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode());
167
+                throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode());
168 168
         }
169 169
     }
170 170
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
      */
179 179
     public function getRecording(string $recordingId): string
180 180
     {
181
-        $response = $this->client()->get(Uri::RECORDINGS_URI.'/'.$recordingId);
181
+        $response = $this->client()->get(Uri::RECORDINGS_URI . '/' . $recordingId);
182 182
         switch ($response->getStatusCode()) {
183 183
             case 200:
184 184
                 $recording = RecordingBuilder::build(json_decode($response->getBody()->getContents(), true));
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
                 throw new OpenViduRecordingNotFoundException();
188 188
                 break;
189 189
             default:
190
-                throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode());
190
+                throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode());
191 191
         }
192 192
     }
193 193
 
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
                 }
210 210
                 return $recordings;
211 211
             default:
212
-                throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode());
212
+                throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode());
213 213
         }
214 214
     }
215 215
 
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
      */
225 225
     public function deleteRecording(string $recordingId): bool
226 226
     {
227
-        $response = $this->client()->delete(Uri::RECORDINGS_URI.'/'.$recordingId);
227
+        $response = $this->client()->delete(Uri::RECORDINGS_URI . '/' . $recordingId);
228 228
 
229 229
         switch ($response->getStatusCode()) {
230 230
             case 200:
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
                 throw new OpenViduRecordingStatusException("The recording has `started` status. Stop it before deletion.");
237 237
                 break;
238 238
             default:
239
-                throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode());
239
+                throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode());
240 240
         }
241 241
     }
242 242
 
Please login to merge, or discard this patch.