@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | 'auth' => [ |
| 75 | 75 | $this->config['app'], $this->config['secret'] |
| 76 | 76 | ], |
| 77 | - 'base_uri' => $this->config['domain'].':'.$this->config['port'], |
|
| 77 | + 'base_uri' => $this->config['domain'] . ':' . $this->config['port'], |
|
| 78 | 78 | 'debug' => $this->config['debug'], |
| 79 | 79 | 'http_errors' => false, |
| 80 | 80 | 'verify' => false |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | case 501: |
| 137 | 137 | throw new OpenViduServerRecordingIsDisabledException(); |
| 138 | 138 | default: |
| 139 | - throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode()); |
|
| 139 | + throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode()); |
|
| 140 | 140 | } |
| 141 | 141 | } |
| 142 | 142 | |
@@ -166,14 +166,14 @@ discard block |
||
| 166 | 166 | */ |
| 167 | 167 | public function getRecording(string $recordingId): Recording |
| 168 | 168 | { |
| 169 | - $response = $this->client()->get(Uri::RECORDINGS_URI.'/'.$recordingId); |
|
| 169 | + $response = $this->client()->get(Uri::RECORDINGS_URI . '/' . $recordingId); |
|
| 170 | 170 | switch ($response->getStatusCode()) { |
| 171 | 171 | case 200: |
| 172 | 172 | return RecordingBuilder::build(json_decode($response->getBody()->getContents(), true)); |
| 173 | 173 | case 404: |
| 174 | 174 | throw new OpenViduRecordingNotFoundException(); |
| 175 | 175 | default: |
| 176 | - throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode()); |
|
| 176 | + throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode()); |
|
| 177 | 177 | } |
| 178 | 178 | } |
| 179 | 179 | |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | */ |
| 202 | 202 | public function stopRecording(string $recordingId): Recording |
| 203 | 203 | { |
| 204 | - $response = $this->client()->post(Uri::RECORDINGS_STOP.'/'.$recordingId); |
|
| 204 | + $response = $this->client()->post(Uri::RECORDINGS_STOP . '/' . $recordingId); |
|
| 205 | 205 | switch ($response->getStatusCode()) { |
| 206 | 206 | case 200: |
| 207 | 207 | $recording = RecordingBuilder::build(json_decode($response->getBody()->getContents(), true)); |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | case 406: |
| 217 | 217 | throw new OpenViduRecordingStatusException("The recording has `starting` status. Wait until `started` status before stopping the recording."); |
| 218 | 218 | default: |
| 219 | - throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode()); |
|
| 219 | + throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode()); |
|
| 220 | 220 | } |
| 221 | 221 | } |
| 222 | 222 | |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | } |
| 239 | 239 | return $recordings; |
| 240 | 240 | default: |
| 241 | - throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode()); |
|
| 241 | + throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode()); |
|
| 242 | 242 | } |
| 243 | 243 | } |
| 244 | 244 | |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | */ |
| 254 | 254 | public function deleteRecording(string $recordingId): bool |
| 255 | 255 | { |
| 256 | - $response = $this->client()->delete(Uri::RECORDINGS_URI.'/'.$recordingId); |
|
| 256 | + $response = $this->client()->delete(Uri::RECORDINGS_URI . '/' . $recordingId); |
|
| 257 | 257 | |
| 258 | 258 | switch ($response->getStatusCode()) { |
| 259 | 259 | case 200: |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | throw new OpenViduRecordingStatusException("The recording has `started` status. Stop it before deletion."); |
| 266 | 266 | break; |
| 267 | 267 | default: |
| 268 | - throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode()); |
|
| 268 | + throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode()); |
|
| 269 | 269 | } |
| 270 | 270 | } |
| 271 | 271 | |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | case 406: |
| 329 | 329 | throw new OpenViduSessionHasNotConnectedParticipantsException(); |
| 330 | 330 | default: |
| 331 | - throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode()); |
|
| 331 | + throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode()); |
|
| 332 | 332 | } |
| 333 | 333 | } |
| 334 | 334 | } |
@@ -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 | |