@@ -265,8 +265,10 @@ discard block |
||
265 | 265 | $headers = explode("\n", $headers); |
266 | 266 | $parsedHeaders = array(); |
267 | 267 | foreach ($headers as $i=>$header) { |
268 | - if ($i==0) |
|
269 | - continue; // Skip first line (http code). |
|
268 | + if ($i==0) { |
|
269 | + continue; |
|
270 | + } |
|
271 | + // Skip first line (http code). |
|
270 | 272 | $pos = strpos($header, ':'); |
271 | 273 | if ($pos!=false) { |
272 | 274 | $headerName = trim(strtolower(substr($header, 0, $pos))); |
@@ -419,14 +421,17 @@ discard block |
||
419 | 421 | */ |
420 | 422 | private function getAccessTokenByRefreshToken() |
421 | 423 | { |
422 | - if (!isset($this->authCredentials['client_id'])) |
|
423 | - throw new Exception('OAuth 2.0 client ID is not set'); |
|
424 | + if (!isset($this->authCredentials['client_id'])) { |
|
425 | + throw new Exception('OAuth 2.0 client ID is not set'); |
|
426 | + } |
|
424 | 427 | |
425 | - if (!isset($this->authCredentials['client_secret'])) |
|
426 | - throw new Exception('OAuth 2.0 client secret is not set'); |
|
428 | + if (!isset($this->authCredentials['client_secret'])) { |
|
429 | + throw new Exception('OAuth 2.0 client secret is not set'); |
|
430 | + } |
|
427 | 431 | |
428 | - if (!isset($this->authCredentials['refresh_token'])) |
|
429 | - throw new Exception('Refresh token is not set'); |
|
432 | + if (!isset($this->authCredentials['refresh_token'])) { |
|
433 | + throw new Exception('Refresh token is not set'); |
|
434 | + } |
|
430 | 435 | |
431 | 436 | $clientId = $this->authCredentials['client_id']; |
432 | 437 | $clientSecret = $this->authCredentials['client_secret']; |