@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | */ |
95 | 95 | public function post(string $relativePath, $encodedData, ?string $contentType, array $additionalHeaders = [], bool $authenticate = true): ResponseInterface |
96 | 96 | { |
97 | - if (! empty($contentType)) { |
|
97 | + if (!empty($contentType)) { |
|
98 | 98 | $additionalHeaders['Content-Type'] = $contentType; |
99 | 99 | } |
100 | 100 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | public function put(string $relativePath, $encodedData, ?string $contentType, array $additionalHeaders = [], bool $authenticate = true): ResponseInterface |
116 | 116 | { |
117 | - if (! empty($contentType)) { |
|
117 | + if (!empty($contentType)) { |
|
118 | 118 | $additionalHeaders['Content-Type'] = $contentType; |
119 | 119 | } |
120 | 120 | |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | */ |
134 | 134 | public function postJson(string $relativePath, $data, array $additionalHeaders = [], bool $authenticate = true): ResponseInterface |
135 | 135 | { |
136 | - if (! is_array($data) || ! $data instanceof \stdClass) { |
|
136 | + if (!is_array($data) || !$data instanceof \stdClass) { |
|
137 | 137 | throw new BokbasenApiClientException('Data must be array or stdClass'); |
138 | 138 | } |
139 | 139 | $data = json_encode($data); |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | */ |
157 | 157 | public function get(string $relativePath, ?string $accept = null, array $additionalHeaders = [], $authenticate = true): ResponseInterface |
158 | 158 | { |
159 | - if (! empty($accept)) { |
|
159 | + if (!empty($accept)) { |
|
160 | 160 | $additionalHeaders['Accept'] = $accept; |
161 | 161 | } |
162 | 162 | |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | $headers = $additionalHeaders; |
182 | 182 | } |
183 | 183 | |
184 | - if (! is_null($this->logger)) { |
|
184 | + if (!is_null($this->logger)) { |
|
185 | 185 | $this->logger->debug(sprintf('Executing HTTP %s request to %s with data %s ', $method, $completeUrl, $encodedData)); |
186 | 186 | } |
187 | 187 | |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | { |
200 | 200 | if (is_null($httpClient)) { |
201 | 201 | $this->httpClient = HttpClientDiscovery::find(); |
202 | - if (! is_null($this->logger)) { |
|
202 | + if (!is_null($this->logger)) { |
|
203 | 203 | $this->logger->debug('HttpClientDiscovery::find() used to find HTTP client in ' . __CLASS__); |
204 | 204 | } |
205 | 205 | } else { |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | */ |
260 | 260 | protected function needReAuthentication(ResponseInterface $response): bool |
261 | 261 | { |
262 | - if ($response->getStatusCode() == 401 && ! $this->login->isReAuthAttempted()) { |
|
262 | + if ($response->getStatusCode() == 401 && !$this->login->isReAuthAttempted()) { |
|
263 | 263 | $this->login->reAuthenticate(); |
264 | 264 | return true; |
265 | 265 | } else { |