@@ -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 | |
@@ -466,7 +466,7 @@ discard block |
||
466 | 466 | |
467 | 467 | private function getTimestampFromExpiresIn($expiresIn) |
468 | 468 | { |
469 | - if (!is_numeric($expiresIn)) { |
|
469 | + if ( ! is_numeric($expiresIn)) { |
|
470 | 470 | throw new \InvalidArgumentException('Function requires a numeric expires value'); |
471 | 471 | } |
472 | 472 | |
@@ -550,7 +550,7 @@ discard block |
||
550 | 550 | */ |
551 | 551 | private function parseExceptionForErrorMessages(Exception $e) |
552 | 552 | { |
553 | - if (! $e instanceof BadResponseException) { |
|
553 | + if ( ! $e instanceof BadResponseException) { |
|
554 | 554 | throw new ApiException($e->getMessage()); |
555 | 555 | } |
556 | 556 | |
@@ -559,13 +559,13 @@ discard block |
||
559 | 559 | $responseBody = $response->getBody()->getContents(); |
560 | 560 | $decodedResponseBody = json_decode($responseBody, true); |
561 | 561 | |
562 | - if (! is_null($decodedResponseBody) && isset($decodedResponseBody['error']['message']['value'])) { |
|
562 | + if ( ! is_null($decodedResponseBody) && isset($decodedResponseBody['error']['message']['value'])) { |
|
563 | 563 | $errorMessage = $decodedResponseBody['error']['message']['value']; |
564 | 564 | } else { |
565 | 565 | $errorMessage = $responseBody; |
566 | 566 | } |
567 | 567 | |
568 | - throw new ApiException('Error ' . $response->getStatusCode() .': ' . $errorMessage); |
|
568 | + throw new ApiException('Error ' . $response->getStatusCode() . ': ' . $errorMessage); |
|
569 | 569 | } |
570 | 570 | |
571 | 571 | /** |