@@ -58,9 +58,9 @@ |
||
| 58 | 58 | if (0 !== count($this->meta)) { |
| 59 | 59 | foreach ($this->meta as $key => $value) { |
| 60 | 60 | if (!is_bool($value)) { |
| 61 | - $queries['meta_' . $key] = $value; |
|
| 61 | + $queries['meta_'.$key] = $value; |
|
| 62 | 62 | } else { |
| 63 | - $queries['meta_' . $key] = $value ? 'true' : 'false'; |
|
| 63 | + $queries['meta_'.$key] = $value ? 'true' : 'false'; |
|
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | } |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | if (!is_string($result)) { |
| 78 | - throw new \RuntimeException('String expected, but ' . gettype($result) . ' received.'); |
|
| 78 | + throw new \RuntimeException('String expected, but '.gettype($result).' received.'); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | return $result; |
@@ -55,9 +55,9 @@ |
||
| 55 | 55 | if (0 !== count($this->userData)) { |
| 56 | 56 | foreach ($this->userData as $key => $value) { |
| 57 | 57 | if (!is_bool($value)) { |
| 58 | - $queries['userdata-' . $key] = $value; |
|
| 58 | + $queries['userdata-'.$key] = $value; |
|
| 59 | 59 | } else { |
| 60 | - $queries['userdata-' . $key] = $value ? 'true' : 'false'; |
|
| 60 | + $queries['userdata-'.$key] = $value ? 'true' : 'false'; |
|
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | } |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | public function buildUrl(string $method = '', string $params = '', bool $append = true): string |
| 53 | 53 | { |
| 54 | - return $this->bbbServerBaseUrl . 'api/' . $method . ($append ? '?' . $this->buildQs($method, $params) : ''); |
|
| 54 | + return $this->bbbServerBaseUrl.'api/'.$method.($append ? '?'.$this->buildQs($method, $params) : ''); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /** |
@@ -59,6 +59,6 @@ discard block |
||
| 59 | 59 | */ |
| 60 | 60 | public function buildQs(string $method = '', string $params = ''): string |
| 61 | 61 | { |
| 62 | - return $params . '&checksum=' . hash($this->hashingAlgorithm, $method . $params . $this->securitySalt); |
|
| 62 | + return $params.'&checksum='.hash($this->hashingAlgorithm, $method.$params.$this->securitySalt); |
|
| 63 | 63 | } |
| 64 | 64 | } |
@@ -29,13 +29,13 @@ |
||
| 29 | 29 | { |
| 30 | 30 | public static function loadEnvironmentVariables(): void |
| 31 | 31 | { |
| 32 | - $envPath = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR; |
|
| 32 | + $envPath = __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR; |
|
| 33 | 33 | $envFileMain = '.env'; |
| 34 | 34 | $envFileLocal = '.env.local'; |
| 35 | 35 | |
| 36 | - if (file_exists($envPath . $envFileLocal)) { |
|
| 36 | + if (file_exists($envPath.$envFileLocal)) { |
|
| 37 | 37 | $envFile = $envFileLocal; |
| 38 | - } elseif (file_exists($envPath . $envFileMain)) { |
|
| 38 | + } elseif (file_exists($envPath.$envFileMain)) { |
|
| 39 | 39 | $envFile = $envFileMain; |
| 40 | 40 | } else { |
| 41 | 41 | $envPath = realpath($envPath); |
@@ -32,12 +32,12 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | class Fixtures |
| 34 | 34 | { |
| 35 | - public const PATH = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR . 'fixtures' . DIRECTORY_SEPARATOR; |
|
| 35 | + public const PATH = __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'tests'.DIRECTORY_SEPARATOR.'fixtures'.DIRECTORY_SEPARATOR; |
|
| 36 | 36 | |
| 37 | 37 | // LOADERS --------------------------------------------------------------------------------------------------------- |
| 38 | 38 | public static function fromXmlFile(string $filename): \SimpleXMLElement |
| 39 | 39 | { |
| 40 | - $uri = self::PATH . $filename; |
|
| 40 | + $uri = self::PATH.$filename; |
|
| 41 | 41 | |
| 42 | 42 | if (!file_exists($uri)) { |
| 43 | 43 | throw new \RuntimeException("File '{$uri}' not found."); |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | public static function fromJsonFile(string $filename): string |
| 62 | 62 | { |
| 63 | - $uri = self::PATH . $filename; |
|
| 63 | + $uri = self::PATH.$filename; |
|
| 64 | 64 | |
| 65 | 65 | if (!file_exists($uri)) { |
| 66 | 66 | throw new \RuntimeException("File '{$uri}' not found."); |
@@ -80,12 +80,12 @@ discard block |
||
| 80 | 80 | { |
| 81 | 81 | // Provide an early error message if configuration is wrong |
| 82 | 82 | if (is_null($secret) && false === getenv('BBB_SERVER_BASE_URL')) { |
| 83 | - throw new \RuntimeException('No BBB-Server-Url found! Please provide it either in constructor ' . |
|
| 83 | + throw new \RuntimeException('No BBB-Server-Url found! Please provide it either in constructor '. |
|
| 84 | 84 | "(1st argument) or by environment variable 'BBB_SERVER_BASE_URL'!"); |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | if (is_null($secret) && false === getenv('BBB_SECRET') && false === getenv('BBB_SECURITY_SALT')) { |
| 88 | - throw new \RuntimeException('No BBB-Secret (or BBB-Salt) found! Please provide it either in constructor ' . |
|
| 88 | + throw new \RuntimeException('No BBB-Secret (or BBB-Salt) found! Please provide it either in constructor '. |
|
| 89 | 89 | "(2nd argument) or by environment variable 'BBB_SECRET' (or 'BBB_SECURITY_SALT')!"); |
| 90 | 90 | } |
| 91 | 91 | |
@@ -431,7 +431,7 @@ discard block |
||
| 431 | 431 | $cookieFile = tmpfile(); |
| 432 | 432 | |
| 433 | 433 | if (!$ch) { // @phpstan-ignore-line |
| 434 | - throw new \RuntimeException('Unhandled curl error: ' . curl_error($ch)); |
|
| 434 | + throw new \RuntimeException('Unhandled curl error: '.curl_error($ch)); |
|
| 435 | 435 | } |
| 436 | 436 | |
| 437 | 437 | // JSESSIONID |
@@ -457,8 +457,8 @@ discard block |
||
| 457 | 457 | curl_setopt($ch, CURLOPT_POST, 1); |
| 458 | 458 | curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); |
| 459 | 459 | curl_setopt($ch, CURLOPT_HTTPHEADER, [ |
| 460 | - 'Content-type: ' . $contentType, |
|
| 461 | - 'Content-length: ' . mb_strlen($payload), |
|
| 460 | + 'Content-type: '.$contentType, |
|
| 461 | + 'Content-length: '.mb_strlen($payload), |
|
| 462 | 462 | ]); |
| 463 | 463 | } |
| 464 | 464 | |
@@ -479,7 +479,7 @@ discard block |
||
| 479 | 479 | |
| 480 | 480 | // ANALYSE |
| 481 | 481 | if (false === $data) { |
| 482 | - throw new \RuntimeException('Unhandled curl error: ' . curl_error($ch)); |
|
| 482 | + throw new \RuntimeException('Unhandled curl error: '.curl_error($ch)); |
|
| 483 | 483 | } |
| 484 | 484 | |
| 485 | 485 | if (is_bool($data)) { |
@@ -487,7 +487,7 @@ discard block |
||
| 487 | 487 | } |
| 488 | 488 | |
| 489 | 489 | if ($httpCode < 200 || $httpCode >= 300) { |
| 490 | - throw new BadResponseException('Bad response, HTTP code: ' . $httpCode . ', url: ' . $url); |
|
| 490 | + throw new BadResponseException('Bad response, HTTP code: '.$httpCode.', url: '.$url); |
|
| 491 | 491 | } |
| 492 | 492 | |
| 493 | 493 | // CLOSE AND UNSET |