Completed
Push — master ( 7afc8a...e6c94f )
by James
02:57
created
lib/WebMarketingROI/OptimizelyPHP/OptimizelyApiClient.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -289,14 +289,17 @@
 block discarded – undo
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'];
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/Metric.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,9 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
tests/OptimizelyPHPTest/Service/v2/ProjectsTest.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -219,8 +219,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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 ++;
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/Change.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,9 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/Datapoint.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,9 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/CampaignResults.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,9 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/CampaignMetricResults.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,9 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/VariationReach.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,9 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/Project.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,9 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.