@@ -186,11 +186,11 @@ |
||
186 | 186 | } |
187 | 187 | |
188 | 188 | // If access token is not set or token has expired, acquire new token |
189 | - if (empty($this->accessToken)) { |
|
190 | - $this->acquireAccessToken(); |
|
191 | - } else if($this->tokenHasExpired()) { |
|
192 | - return 'expired'; |
|
193 | - } |
|
189 | + if (empty($this->accessToken)) { |
|
190 | + $this->acquireAccessToken(); |
|
191 | + } else if($this->tokenHasExpired()) { |
|
192 | + return 'expired'; |
|
193 | + } |
|
194 | 194 | |
195 | 195 | $client = $this->client(); |
196 | 196 |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | // If access token is not set or token has expired, acquire new token |
189 | 189 | if (empty($this->accessToken)) { |
190 | 190 | $this->acquireAccessToken(); |
191 | - } else if($this->tokenHasExpired()) { |
|
191 | + } else if ($this->tokenHasExpired()) { |
|
192 | 192 | return 'expired'; |
193 | 193 | } |
194 | 194 | |
@@ -221,12 +221,12 @@ discard block |
||
221 | 221 | } |
222 | 222 | |
223 | 223 | // If we have a token, sign the request |
224 | - if (! $this->needsAuthentication() && ! empty($this->accessToken)) { |
|
224 | + if ( ! $this->needsAuthentication() && ! empty($this->accessToken)) { |
|
225 | 225 | $headers['Authorization'] = 'Bearer ' . $this->accessToken; |
226 | 226 | } |
227 | 227 | |
228 | 228 | // Create param string |
229 | - if (! empty($params)) { |
|
229 | + if ( ! empty($params)) { |
|
230 | 230 | $endpoint .= '?' . http_build_query($params); |
231 | 231 | } |
232 | 232 | |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | */ |
538 | 538 | private function getTimestampFromExpiresIn($expiresIn) |
539 | 539 | { |
540 | - if (! ctype_digit($expiresIn)) { |
|
540 | + if ( ! ctype_digit($expiresIn)) { |
|
541 | 541 | throw new \InvalidArgumentException('Function requires a numeric expires value'); |
542 | 542 | } |
543 | 543 | |
@@ -638,7 +638,7 @@ discard block |
||
638 | 638 | */ |
639 | 639 | private function parseExceptionForErrorMessages(Exception $e) |
640 | 640 | { |
641 | - if (! $e instanceof BadResponseException) { |
|
641 | + if ( ! $e instanceof BadResponseException) { |
|
642 | 642 | throw new ApiException($e->getMessage(), 0, $e); |
643 | 643 | } |
644 | 644 | |
@@ -650,7 +650,7 @@ discard block |
||
650 | 650 | $responseBody = $response->getBody()->getContents(); |
651 | 651 | $decodedResponseBody = json_decode($responseBody, true); |
652 | 652 | |
653 | - if (! is_null($decodedResponseBody) && isset($decodedResponseBody['error']['message']['value'])) { |
|
653 | + if ( ! is_null($decodedResponseBody) && isset($decodedResponseBody['error']['message']['value'])) { |
|
654 | 654 | $errorMessage = $decodedResponseBody['error']['message']['value']; |
655 | 655 | } else { |
656 | 656 | $errorMessage = $responseBody; |