@@ -18,6 +18,6 @@ |
||
| 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 | } |
@@ -18,6 +18,6 @@ |
||
| 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 | } |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | case 409: |
| 83 | 83 | return $this->properties->getCustomSessionId(); |
| 84 | 84 | default: |
| 85 | - throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode()); |
|
| 85 | + throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode()); |
|
| 86 | 86 | } |
| 87 | 87 | } else { |
| 88 | 88 | return $this->sessionId; |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | case 404: |
| 117 | 117 | throw new OpenViduSessionNotFoundException(); |
| 118 | 118 | default: |
| 119 | - throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode()); |
|
| 119 | + throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode()); |
|
| 120 | 120 | } |
| 121 | 121 | } catch (Exception $e) { |
| 122 | 122 | throw new OpenViduTokenCantCreateException($e->getMessage(), $e); |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | */ |
| 131 | 131 | public function close() |
| 132 | 132 | { |
| 133 | - $response = $this->client->delete(Uri::SESSION_URI.'/'.$this->sessionId); |
|
| 133 | + $response = $this->client->delete(Uri::SESSION_URI . '/' . $this->sessionId); |
|
| 134 | 134 | switch ($response->getStatusCode()) { |
| 135 | 135 | case 204: |
| 136 | 136 | Cache::store('openvidu')->forget($this->sessionId); |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | case 404: |
| 139 | 139 | throw new OpenViduSessionNotFoundException(); |
| 140 | 140 | default: |
| 141 | - throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode()); |
|
| 141 | + throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode()); |
|
| 142 | 142 | } |
| 143 | 143 | } |
| 144 | 144 | |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | |
| 161 | 161 | public function fetch() |
| 162 | 162 | { |
| 163 | - $response = $this->client->get(Uri::SESSION_URI.'/'.$this->sessionId, [ |
|
| 163 | + $response = $this->client->get(Uri::SESSION_URI . '/' . $this->sessionId, [ |
|
| 164 | 164 | 'headers' => [ |
| 165 | 165 | 'Content-Type' => 'application/x-www-form-urlencoded', |
| 166 | 166 | 'Accept' => 'application/json', |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | */ |
| 276 | 276 | public function forceDisconnect(string $connectionId) |
| 277 | 277 | { |
| 278 | - $response = $this->client->delete(Uri::SESSION_URI.'/'.$this->sessionId.'/connection/'.$connectionId, [ |
|
| 278 | + $response = $this->client->delete(Uri::SESSION_URI . '/' . $this->sessionId . '/connection/' . $connectionId, [ |
|
| 279 | 279 | 'headers' => [ |
| 280 | 280 | 'Content-Type' => 'application/x-www-form-urlencoded', |
| 281 | 281 | 'Accept' => 'application/json', |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | case 404: |
| 292 | 292 | throw new OpenViduConnectionNotFoundException(); |
| 293 | 293 | default: |
| 294 | - throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode()); |
|
| 294 | + throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode()); |
|
| 295 | 295 | } |
| 296 | 296 | } |
| 297 | 297 | |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | private function leaveSession(string $connectionId) |
| 305 | 305 | { |
| 306 | 306 | $connectionClosed = null; |
| 307 | - $this->activeConnections = array_filter($this->activeConnections, function (Connection $connection) use (&$connectionClosed, $connectionId) { |
|
| 307 | + $this->activeConnections = array_filter($this->activeConnections, function(Connection $connection) use (&$connectionClosed, $connectionId) { |
|
| 308 | 308 | if ($connection->getConnectionId() !== $connectionId) { |
| 309 | 309 | return true; |
| 310 | 310 | } |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | */ |
| 335 | 335 | public function publish(IPCameraOptions $IPCameraOptions) |
| 336 | 336 | { |
| 337 | - $response = $this->client->post(Uri::SESSION_URI.'/'.$this->sessionId.'/connection', [ |
|
| 337 | + $response = $this->client->post(Uri::SESSION_URI . '/' . $this->sessionId . '/connection', [ |
|
| 338 | 338 | RequestOptions::JSON => array_merge($IPCameraOptions->toArray()) |
| 339 | 339 | ]); |
| 340 | 340 | switch ($response->getStatusCode()) { |
@@ -371,7 +371,7 @@ discard block |
||
| 371 | 371 | */ |
| 372 | 372 | public function forceUnpublish(string $streamId) |
| 373 | 373 | { |
| 374 | - $response = $this->client->delete(Uri::SESSION_URI.'/'.$this->sessionId.'/stream/'.$streamId, [ |
|
| 374 | + $response = $this->client->delete(Uri::SESSION_URI . '/' . $this->sessionId . '/stream/' . $streamId, [ |
|
| 375 | 375 | 'headers' => [ |
| 376 | 376 | 'Content-Type' => 'application/x-www-form-urlencoded', |
| 377 | 377 | 'Accept' => 'application/json', |
@@ -392,7 +392,7 @@ discard block |
||
| 392 | 392 | case 405: |
| 393 | 393 | throw new OpenViduStreamCantCloseException("You cannot directly delete the stream of an IPCAM participant"); |
| 394 | 394 | default: |
| 395 | - throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode()); |
|
| 395 | + throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode()); |
|
| 396 | 396 | } |
| 397 | 397 | } |
| 398 | 398 | |