@@ -289,14 +289,17 @@ |
||
| 289 | 289 | */ |
| 290 | 290 | private function getAccessTokenByRefreshToken() |
| 291 | 291 | { |
| 292 | - if (!isset($this->authCredentials['client_id'])) |
|
| 293 | - throw new \Exception('OAuth 2.0 client ID is not set'); |
|
| 292 | + if (!isset($this->authCredentials['client_id'])) { |
|
| 293 | + throw new \Exception('OAuth 2.0 client ID is not set'); |
|
| 294 | + } |
|
| 294 | 295 | |
| 295 | - if (!isset($this->authCredentials['client_secret'])) |
|
| 296 | - throw new \Exception('OAuth 2.0 client secret is not set'); |
|
| 296 | + if (!isset($this->authCredentials['client_secret'])) { |
|
| 297 | + throw new \Exception('OAuth 2.0 client secret is not set'); |
|
| 298 | + } |
|
| 297 | 299 | |
| 298 | - if (!isset($this->authCredentials['refresh_token'])) |
|
| 299 | - throw new \Exception('Refresh token is not set'); |
|
| 300 | + if (!isset($this->authCredentials['refresh_token'])) { |
|
| 301 | + throw new \Exception('Refresh token is not set'); |
|
| 302 | + } |
|
| 300 | 303 | |
| 301 | 304 | $clientId = $this->authCredentials['client_id']; |
| 302 | 305 | $clientSecret = $this->authCredentials['client_secret']; |
@@ -51,8 +51,9 @@ |
||
| 51 | 51 | // Remove options with empty values |
| 52 | 52 | $cleanedOptions = array(); |
| 53 | 53 | foreach ($options as $name=>$value) { |
| 54 | - if ($value!==null) |
|
| 55 | - $cleanedOptions[$name] = $value; |
|
| 54 | + if ($value!==null) { |
|
| 55 | + $cleanedOptions[$name] = $value; |
|
| 56 | + } |
|
| 56 | 57 | } |
| 57 | 58 | |
| 58 | 59 | return $cleanedOptions; |
@@ -219,8 +219,9 @@ discard block |
||
| 219 | 219 | |
| 220 | 220 | public function testIntegration() |
| 221 | 221 | { |
| 222 | - if (!getenv('OPTIMIZELY_PHP_TEST_INTEGRATION')) |
|
| 223 | - $this->markTestSkipped('OPTIMIZELY_PHP_TEST_INTEGRATION env var is not set'); |
|
| 222 | + if (!getenv('OPTIMIZELY_PHP_TEST_INTEGRATION')) { |
|
| 223 | + $this->markTestSkipped('OPTIMIZELY_PHP_TEST_INTEGRATION env var is not set'); |
|
| 224 | + } |
|
| 224 | 225 | |
| 225 | 226 | $credentials = $this->loadCredentialsFromFile(); |
| 226 | 227 | |
@@ -266,8 +267,9 @@ discard block |
||
| 266 | 267 | } |
| 267 | 268 | |
| 268 | 269 | } catch (\Exception $e) { |
| 269 | - if ($e->getCode()!=502) |
|
| 270 | - throw $e; |
|
| 270 | + if ($e->getCode()!=502) { |
|
| 271 | + throw $e; |
|
| 272 | + } |
|
| 271 | 273 | break; |
| 272 | 274 | } |
| 273 | 275 | $page ++; |
@@ -51,8 +51,9 @@ |
||
| 51 | 51 | // Remove options with empty values |
| 52 | 52 | $cleanedOptions = array(); |
| 53 | 53 | foreach ($options as $name=>$value) { |
| 54 | - if ($value!==null) |
|
| 55 | - $cleanedOptions[$name] = $value; |
|
| 54 | + if ($value!==null) { |
|
| 55 | + $cleanedOptions[$name] = $value; |
|
| 56 | + } |
|
| 56 | 57 | } |
| 57 | 58 | |
| 58 | 59 | return $cleanedOptions; |
@@ -51,8 +51,9 @@ |
||
| 51 | 51 | // Remove options with empty values |
| 52 | 52 | $cleanedOptions = array(); |
| 53 | 53 | foreach ($options as $name=>$value) { |
| 54 | - if ($value!==null) |
|
| 55 | - $cleanedOptions[$name] = $value; |
|
| 54 | + if ($value!==null) { |
|
| 55 | + $cleanedOptions[$name] = $value; |
|
| 56 | + } |
|
| 56 | 57 | } |
| 57 | 58 | |
| 58 | 59 | return $cleanedOptions; |
@@ -51,8 +51,9 @@ |
||
| 51 | 51 | // Remove options with empty values |
| 52 | 52 | $cleanedOptions = array(); |
| 53 | 53 | foreach ($options as $name=>$value) { |
| 54 | - if ($value!==null) |
|
| 55 | - $cleanedOptions[$name] = $value; |
|
| 54 | + if ($value!==null) { |
|
| 55 | + $cleanedOptions[$name] = $value; |
|
| 56 | + } |
|
| 56 | 57 | } |
| 57 | 58 | |
| 58 | 59 | return $cleanedOptions; |
@@ -51,8 +51,9 @@ |
||
| 51 | 51 | // Remove options with empty values |
| 52 | 52 | $cleanedOptions = array(); |
| 53 | 53 | foreach ($options as $name=>$value) { |
| 54 | - if ($value!==null) |
|
| 55 | - $cleanedOptions[$name] = $value; |
|
| 54 | + if ($value!==null) { |
|
| 55 | + $cleanedOptions[$name] = $value; |
|
| 56 | + } |
|
| 56 | 57 | } |
| 57 | 58 | |
| 58 | 59 | return $cleanedOptions; |
@@ -51,8 +51,9 @@ |
||
| 51 | 51 | // Remove options with empty values |
| 52 | 52 | $cleanedOptions = array(); |
| 53 | 53 | foreach ($options as $name=>$value) { |
| 54 | - if ($value!==null) |
|
| 55 | - $cleanedOptions[$name] = $value; |
|
| 54 | + if ($value!==null) { |
|
| 55 | + $cleanedOptions[$name] = $value; |
|
| 56 | + } |
|
| 56 | 57 | } |
| 57 | 58 | |
| 58 | 59 | return $cleanedOptions; |
@@ -51,8 +51,9 @@ |
||
| 51 | 51 | // Remove options with empty values |
| 52 | 52 | $cleanedOptions = array(); |
| 53 | 53 | foreach ($options as $name=>$value) { |
| 54 | - if ($value!==null) |
|
| 55 | - $cleanedOptions[$name] = $value; |
|
| 54 | + if ($value!==null) { |
|
| 55 | + $cleanedOptions[$name] = $value; |
|
| 56 | + } |
|
| 56 | 57 | } |
| 57 | 58 | |
| 58 | 59 | return $cleanedOptions; |