@@ -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 | } |
@@ -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 | } |
@@ -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 | } |
@@ -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 | 'auth' => [ |
| 83 | 83 | $this->config['app'], $this->config['secret'] |
| 84 | 84 | ], |
| 85 | - 'base_uri' => $this->config['domain'].':'.$this->config['port'], |
|
| 85 | + 'base_uri' => $this->config['domain'] . ':' . $this->config['port'], |
|
| 86 | 86 | 'debug' => $this->config['debug'], |
| 87 | 87 | 'http_errors' => false, |
| 88 | 88 | 'verify' => false |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | throw new OpenViduServerRecordingIsDisabledException(); |
| 142 | 142 | break; |
| 143 | 143 | default: |
| 144 | - throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode()); |
|
| 144 | + throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode()); |
|
| 145 | 145 | } |
| 146 | 146 | } |
| 147 | 147 | |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | */ |
| 187 | 187 | public function stopRecording(string $recordingId): Recording |
| 188 | 188 | { |
| 189 | - $response = $this->client()->post(Uri::RECORDINGS_STOP.'/'.$recordingId); |
|
| 189 | + $response = $this->client()->post(Uri::RECORDINGS_STOP . '/' . $recordingId); |
|
| 190 | 190 | switch ($response->getStatusCode()) { |
| 191 | 191 | case 200: |
| 192 | 192 | $recording = RecordingBuilder::build(json_decode($response->getBody()->getContents(), true)); |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | throw new OpenViduRecordingStatusException("The recording has `starting` status. Wait until `started` status before stopping the recording."); |
| 204 | 204 | break; |
| 205 | 205 | default: |
| 206 | - throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode()); |
|
| 206 | + throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode()); |
|
| 207 | 207 | } |
| 208 | 208 | } |
| 209 | 209 | |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | */ |
| 218 | 218 | public function getRecording(string $recordingId): Recording |
| 219 | 219 | { |
| 220 | - $response = $this->client()->get(Uri::RECORDINGS_URI.'/'.$recordingId); |
|
| 220 | + $response = $this->client()->get(Uri::RECORDINGS_URI . '/' . $recordingId); |
|
| 221 | 221 | switch ($response->getStatusCode()) { |
| 222 | 222 | case 200: |
| 223 | 223 | $recording = RecordingBuilder::build(json_decode($response->getBody()->getContents(), true)); |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | throw new OpenViduRecordingNotFoundException(); |
| 227 | 227 | break; |
| 228 | 228 | default: |
| 229 | - throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode()); |
|
| 229 | + throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode()); |
|
| 230 | 230 | } |
| 231 | 231 | } |
| 232 | 232 | |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | } |
| 249 | 249 | return $recordings; |
| 250 | 250 | default: |
| 251 | - throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode()); |
|
| 251 | + throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode()); |
|
| 252 | 252 | } |
| 253 | 253 | } |
| 254 | 254 | |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | */ |
| 264 | 264 | public function deleteRecording(string $recordingId): bool |
| 265 | 265 | { |
| 266 | - $response = $this->client()->delete(Uri::RECORDINGS_URI.'/'.$recordingId); |
|
| 266 | + $response = $this->client()->delete(Uri::RECORDINGS_URI . '/' . $recordingId); |
|
| 267 | 267 | |
| 268 | 268 | switch ($response->getStatusCode()) { |
| 269 | 269 | case 200: |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | throw new OpenViduRecordingStatusException("The recording has `started` status. Stop it before deletion."); |
| 276 | 276 | break; |
| 277 | 277 | default: |
| 278 | - throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode()); |
|
| 278 | + throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode()); |
|
| 279 | 279 | } |
| 280 | 280 | } |
| 281 | 281 | |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | throw new OpenViduSessionHasNotConnectedParticipantsException(); |
| 343 | 343 | break; |
| 344 | 344 | default: |
| 345 | - throw new OpenViduException("Invalid response status code ".$response->getStatusCode(), $response->getStatusCode()); |
|
| 345 | + throw new OpenViduException("Invalid response status code " . $response->getStatusCode(), $response->getStatusCode()); |
|
| 346 | 346 | } |
| 347 | 347 | } |
| 348 | 348 | } |
@@ -77,7 +77,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | |