@@ -10,7 +10,7 @@ |
||
10 | 10 | { |
11 | 11 | } |
12 | 12 | |
13 | - public function asRaw(bool $keep_authorization_value = false): int|string|array |
|
13 | + public function asRaw(bool $keep_authorization_value = false): int | string | array |
|
14 | 14 | { |
15 | 15 | // To avoid unintentional logging of credentials the default is to mask the value of the Authorization: header |
16 | 16 | if ($keep_authorization_value) { |
@@ -32,7 +32,7 @@ |
||
32 | 32 | 'Accept: application/json', |
33 | 33 | ]; |
34 | 34 | if (!empty($this->auth_string)) { |
35 | - $this->headers[] = 'Authorization: Basic ' . base64_encode($this->auth_string); |
|
35 | + $this->headers[] = 'Authorization: Basic '.base64_encode($this->auth_string); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | // Add custom headers and set headers in cURL object. |
@@ -18,9 +18,9 @@ discard block |
||
18 | 18 | { |
19 | 19 | if (!empty($query)) { |
20 | 20 | if (strpos($path, '?') === false) { |
21 | - $path .= '?' . http_build_query($query, '', '&'); |
|
21 | + $path .= '?'.http_build_query($query, '', '&'); |
|
22 | 22 | } else { |
23 | - $path .= ini_get('arg_separator.output') . http_build_query($query, '', '&'); |
|
23 | + $path .= ini_get('arg_separator.output').http_build_query($query, '', '&'); |
|
24 | 24 | } |
25 | 25 | } |
26 | 26 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | protected function setUrl(string $url): void |
61 | 61 | { |
62 | - curl_setopt($this->client->ch, CURLOPT_URL, Constants::API_URL . trim($url, '/')); |
|
62 | + curl_setopt($this->client->ch, CURLOPT_URL, Constants::API_URL.trim($url, '/')); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | protected function execute(string $request_type, array $form = []): Response |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | // allows for automatic failover on the application layer |
92 | 92 | // as QP is often slow at noticing that they have problems |
93 | 93 | if ($errno === CURLE_OPERATION_TIMEOUTED) { |
94 | - $onTimeout = Client::$onTimeout ?? function () { |
|
94 | + $onTimeout = Client::$onTimeout ?? function() { |
|
95 | 95 | throw new TimeoutException(curl_error($this->client->ch), curl_errno($this->client->ch)); |
96 | 96 | }; |
97 | 97 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | return new Response($response_code, $sent_headers, $received_headers, $response_data); |
115 | 115 | } |
116 | 116 | |
117 | - public function httpBuildQuery(array $query): array|string|null |
|
117 | + public function httpBuildQuery(array $query): array | string | null |
|
118 | 118 | { |
119 | 119 | $query = http_build_query($query, '', '&'); |
120 | 120 |