@@ -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. |
@@ -19,9 +19,9 @@ discard block |
||
| 19 | 19 | { |
| 20 | 20 | if (!empty($query)) { |
| 21 | 21 | if (strpos($path, '?') === false) { |
| 22 | - $path .= '?' . http_build_query($query, '', '&'); |
|
| 22 | + $path .= '?'.http_build_query($query, '', '&'); |
|
| 23 | 23 | } else { |
| 24 | - $path .= ini_get('arg_separator.output') . http_build_query($query, '', '&'); |
|
| 24 | + $path .= ini_get('arg_separator.output').http_build_query($query, '', '&'); |
|
| 25 | 25 | } |
| 26 | 26 | } |
| 27 | 27 | |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | protected function setUrl(string $url): void |
| 62 | 62 | { |
| 63 | - curl_setopt($this->client->ch, CURLOPT_URL, Constants::API_URL . trim($url, '/')); |
|
| 63 | + curl_setopt($this->client->ch, CURLOPT_URL, Constants::API_URL.trim($url, '/')); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | protected function execute(string $request_type, array $form = []): Response |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | // allows for automatic failover on the application layer |
| 93 | 93 | // as QP is often slow at noticing that they have problems |
| 94 | 94 | if ($errno === CURLE_OPERATION_TIMEOUTED) { |
| 95 | - $onTimeout = QuickPay::$onTimeout ?? function () { |
|
| 95 | + $onTimeout = QuickPay::$onTimeout ?? function() { |
|
| 96 | 96 | throw new TimeoutException(curl_error($this->client->ch), curl_errno($this->client->ch)); |
| 97 | 97 | }; |
| 98 | 98 | |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | return new Response($response_code, $sent_headers, $received_headers, $response_data); |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | - public function httpBuildQuery(array $query): array|string|null |
|
| 118 | + public function httpBuildQuery(array $query): array | string | null |
|
| 119 | 119 | { |
| 120 | 120 | $query = http_build_query($query, '', '&'); |
| 121 | 121 | |