@@ -166,12 +166,12 @@ discard block |
||
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | // If we have a token, sign the request |
| 169 | - if (!$this->needsAuthentication() && !empty($this->accessToken)) { |
|
| 169 | + if ( ! $this->needsAuthentication() && ! empty($this->accessToken)) { |
|
| 170 | 170 | $headers['Authorization'] = 'Bearer ' . $this->accessToken; |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | // Create param string |
| 174 | - if (!empty($params)) { |
|
| 174 | + if ( ! empty($params)) { |
|
| 175 | 175 | $endpoint .= '?' . http_build_query($params); |
| 176 | 176 | } |
| 177 | 177 | |
@@ -471,7 +471,7 @@ discard block |
||
| 471 | 471 | */ |
| 472 | 472 | private function getTimestampFromExpiresIn($expiresIn) |
| 473 | 473 | { |
| 474 | - if (!ctype_digit($expiresIn)) { |
|
| 474 | + if ( ! ctype_digit($expiresIn)) { |
|
| 475 | 475 | throw new \InvalidArgumentException('Function requires a numeric expires value'); |
| 476 | 476 | } |
| 477 | 477 | |
@@ -555,7 +555,7 @@ discard block |
||
| 555 | 555 | */ |
| 556 | 556 | private function parseExceptionForErrorMessages(Exception $e) |
| 557 | 557 | { |
| 558 | - if (! $e instanceof BadResponseException) { |
|
| 558 | + if ( ! $e instanceof BadResponseException) { |
|
| 559 | 559 | throw new ApiException($e->getMessage()); |
| 560 | 560 | } |
| 561 | 561 | |
@@ -564,13 +564,13 @@ discard block |
||
| 564 | 564 | $responseBody = $response->getBody()->getContents(); |
| 565 | 565 | $decodedResponseBody = json_decode($responseBody, true); |
| 566 | 566 | |
| 567 | - if (! is_null($decodedResponseBody) && isset($decodedResponseBody['error']['message']['value'])) { |
|
| 567 | + if ( ! is_null($decodedResponseBody) && isset($decodedResponseBody['error']['message']['value'])) { |
|
| 568 | 568 | $errorMessage = $decodedResponseBody['error']['message']['value']; |
| 569 | 569 | } else { |
| 570 | 570 | $errorMessage = $responseBody; |
| 571 | 571 | } |
| 572 | 572 | |
| 573 | - throw new ApiException('Error ' . $response->getStatusCode() .': ' . $errorMessage); |
|
| 573 | + throw new ApiException('Error ' . $response->getStatusCode() . ': ' . $errorMessage); |
|
| 574 | 574 | } |
| 575 | 575 | |
| 576 | 576 | /** |