| @@ -111,8 +111,7 @@ | ||
| 111 | 111 |  		foreach (self::SCHEMA as $name => $definition) { | 
| 112 | 112 | $result[$name] = | 
| 113 | 113 | array_key_exists($name, $config) ? | 
| 114 | - $config[$name] : | |
| 115 | - $this->config[$name] ?? $definition['options']['default'] ?? null; | |
| 114 | + $config[$name] : $this->config[$name] ?? $definition['options']['default'] ?? null; | |
| 116 | 115 | } | 
| 117 | 116 | $filtered = filter_var_array($result, self::SCHEMA); | 
| 118 | 117 | |
| @@ -96,11 +96,11 @@ | ||
| 96 | 96 | * @var string Server base URL | 
| 97 | 97 | */ | 
| 98 | 98 | private readonly string $baseurl, /** | 
| 99 | - * @var string Username | |
| 100 | - */ | |
| 99 | + * @var string Username | |
| 100 | + */ | |
| 101 | 101 | private string $user, /** | 
| 102 | - * @var string Password | |
| 103 | - */ | |
| 102 | + * @var string Password | |
| 103 | + */ | |
| 104 | 104 | private readonly string $pass, | 
| 105 | 105 | ?string $otp = null | 
| 106 | 106 |  	) { | 
| @@ -63,17 +63,17 @@ | ||
| 63 | 63 | * | 
| 64 | 64 | * @see jsonDecode | 
| 65 | 65 | */ | 
| 66 | - private const int JSON_DECODE_ACCEPT_MASK = 31; # 1 1111 accept bitmask (five bits with the msb flags) | |
| 67 | - private const int JSON_DECODE_ACCEPT_JSON = 16; # 1 0000 JSON text | |
| 68 | - private const int JSON_DECODE_ACCEPT_DEFAULT = 23; # 1 0111 default: string, array or object | |
| 69 | - private const int JSON_DECODE_ACCEPT_OBJECT = 17; # 1 0001 object | |
| 70 | - private const int JSON_DECODE_ACCEPT_ARRAY = 18; # 1 0010 array | |
| 71 | - private const int JSON_DECODE_ACCEPT_STRING = 20; # 1 0100 string | |
| 72 | - private const int JSON_DECODE_ACCEPT_ARRAY_OF_OBJECTS = 24; # 1 1000 array with only objects (incl. none) | |
| 73 | - private const int JSON_DECODE_ACCEPT_ARRAY_SINGLE_OBJECT = 25; # 1 1001 array with one single object, return that item | |
| 66 | + private const int JSON_DECODE_ACCEPT_MASK = 31; # 1 1111 accept bitmask (five bits with the msb flags) | |
| 67 | + private const int JSON_DECODE_ACCEPT_JSON = 16; # 1 0000 JSON text | |
| 68 | + private const int JSON_DECODE_ACCEPT_DEFAULT = 23; # 1 0111 default: string, array or object | |
| 69 | + private const int JSON_DECODE_ACCEPT_OBJECT = 17; # 1 0001 object | |
| 70 | + private const int JSON_DECODE_ACCEPT_ARRAY = 18; # 1 0010 array | |
| 71 | + private const int JSON_DECODE_ACCEPT_STRING = 20; # 1 0100 string | |
| 72 | + private const int JSON_DECODE_ACCEPT_ARRAY_OF_OBJECTS = 24; # 1 1000 array with only objects (incl. none) | |
| 73 | + private const int JSON_DECODE_ACCEPT_ARRAY_SINGLE_OBJECT = 25; # 1 1001 array with one single object, return that item | |
| 74 | 74 | private const int JSON_DECODE_ACCEPT_ARRAY_SINGLE_OBJECT_NULLABLE = 26; # 1 1010 array with one single object, return that item, or empty array, return null | 
| 75 | - private const int JSON_DECODE_ACCEPT_SUCCESS_STRING = 28; # 1 1100 string "success" | |
| 76 | - private const int JSON_DECODE_ACCEPT_SUCCESS_OBJECT = 29; # 1 1101 object with single "success" property and value true | |
| 75 | + private const int JSON_DECODE_ACCEPT_SUCCESS_STRING = 28; # 1 1100 string "success" | |
| 76 | + private const int JSON_DECODE_ACCEPT_SUCCESS_OBJECT = 29; # 1 1101 object with single "success" property and value true | |
| 77 | 77 | |
| 78 | 78 | /** | 
| 79 | 79 | * @const string ASCII upper-case characters part of a hexit | 
| @@ -9,7 +9,7 @@ | ||
| 9 | 9 | } | 
| 10 | 10 | |
| 11 | 11 | \spl_autoload_register( | 
| 12 | -	static function ($className) { | |
| 12 | +	static function($className) { | |
| 13 | 13 | $namespacePrefix = __NAMESPACE__ . '\\'; | 
| 14 | 14 | $basePath = __DIR__ . '/'; | 
| 15 | 15 |  		if (!str_starts_with($className, $namespacePrefix)) { | 
| @@ -47,7 +47,7 @@ | ||
| 47 | 47 | * | 
| 48 | 48 | * @throws ConnectionException | 
| 49 | 49 | */ | 
| 50 | -	public static function throwCurlResult(int $code, bool|string $curlResult): never { | |
| 50 | +	public static function throwCurlResult(int $code, bool | string $curlResult): never { | |
| 51 | 51 | $exception = new self(self::reasonPhrase($code), $code); | 
| 52 | 52 | $exception->responseCode = $code; | 
| 53 | 53 | $exception->responseBodyRaw = is_string($curlResult) ? $curlResult : null; |