Passed
Pull Request — master (#9)
by
unknown
03:12
created
src/Session.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                 case 409:
78 78
                     return $this->properties->getCustomSessionId();
79 79
                 default:
80
-                    throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode());
80
+                    throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode());
81 81
             }
82 82
         } else {
83 83
             return $this->sessionId;
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function close()
118 118
     {
119
-        $response = $this->client->delete(Uri::SESSION_URI.'/'.$this->sessionId);
119
+        $response = $this->client->delete(Uri::SESSION_URI . '/' . $this->sessionId);
120 120
         switch ($response->getStatusCode()) {
121 121
             case 204:
122 122
                 Cache::store('openvidu')->forget($this->sessionId);
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                 throw new OpenViduSessionNotFoundException();
126 126
                 break;
127 127
             default:
128
-                throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode());
128
+                throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode());
129 129
         }
130 130
     }
131 131
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 
148 148
     public function fetch()
149 149
     {
150
-        $response = $this->client->get(Uri::SESSION_URI.'/'.$this->sessionId, [
150
+        $response = $this->client->get(Uri::SESSION_URI . '/' . $this->sessionId, [
151 151
             'headers' => [
152 152
                 'Content-Type' => 'application/x-www-form-urlencoded',
153 153
                 'Accept' => 'application/json',
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
      */
263 263
     public function forceDisconnect(string $connectionId)
264 264
     {
265
-        $response = $this->client->delete(Uri::SESSION_URI.'/'.$this->sessionId.'/connection/'.$connectionId, [
265
+        $response = $this->client->delete(Uri::SESSION_URI . '/' . $this->sessionId . '/connection/' . $connectionId, [
266 266
             'headers' => [
267 267
                 'Content-Type' => 'application/x-www-form-urlencoded',
268 268
                 'Accept' => 'application/json',
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
                 throw new OpenViduConnectionNotFoundException();
281 281
                 break;
282 282
             default:
283
-                throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode());
283
+                throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode());
284 284
         }
285 285
     }
286 286
 
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
     private function leaveSession(string $connectionId)
294 294
     {
295 295
         $connectionClosed = null;
296
-        $this->activeConnections = array_filter($this->activeConnections, function (Connection $connection) use (&$connectionClosed, $connectionId) {
296
+        $this->activeConnections = array_filter($this->activeConnections, function(Connection $connection) use (&$connectionClosed, $connectionId) {
297 297
             if ($connection->getConnectionId() !== $connectionId) {
298 298
                 return true;
299 299
             }
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
      */
332 332
     public function forceUnpublish(string $streamId)
333 333
     {
334
-        $response = $this->client->delete(Uri::SESSION_URI.'/'.$this->sessionId.'/stream/'.$streamId, [
334
+        $response = $this->client->delete(Uri::SESSION_URI . '/' . $this->sessionId . '/stream/' . $streamId, [
335 335
             'headers' => [
336 336
                 'Content-Type' => 'application/x-www-form-urlencoded',
337 337
                 'Accept' => 'application/json',
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
                 throw new OpenViduConnectionNotFoundException();
353 353
                 break;
354 354
             default:
355
-                throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode());
355
+                throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode());
356 356
         }
357 357
     }
358 358
 
Please login to merge, or discard this patch.