Completed
Push — master ( 8b4718...61d59f )
by Oleg
02:27
created
tests/OptimizelyPHPTest/Service/v2/ProjectsTest.php 1 patch
Braces   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -356,8 +356,9 @@  discard block
 block discarded – undo
356 356
     
357 357
     public function testIntegration()
358 358
     {
359
-        if (!getenv('OPTIMIZELY_PHP_TEST_INTEGRATION')) 
360
-            $this->markTestSkipped('OPTIMIZELY_PHP_TEST_INTEGRATION env var is not set');
359
+        if (!getenv('OPTIMIZELY_PHP_TEST_INTEGRATION')) {
360
+                    $this->markTestSkipped('OPTIMIZELY_PHP_TEST_INTEGRATION env var is not set');
361
+        }
361 362
         
362 363
         $credentials = $this->loadCredentialsFromFile();
363 364
         
@@ -415,13 +416,13 @@  discard block
 block discarded – undo
415 416
                     }
416 417
                 }
417 418
 
418
-                if ($result->getNextPage()==null)
419
-                    break;
419
+                if ($result->getNextPage()==null) {
420
+                                    break;
421
+                }
420 422
 
421 423
                 $page ++;
422 424
             }
423
-        }
424
-        catch (Exception $e) {
425
+        } catch (Exception $e) {
425 426
             print_r($optimizelyClient->getDiagnosticsInfo());
426 427
             // Handle error.
427 428
             $code = $e->getCode();
@@ -436,8 +437,7 @@  discard block
 block discarded – undo
436 437
         // Try a non-existing project by ID - assume failure
437 438
         try {
438 439
             $result = $optimizelyClient->projects()->get(12345678);        
439
-        } 
440
-        catch(Exception $e) {
440
+        } catch(Exception $e) {
441 441
             $this->assertEquals(Exception::CODE_API_ERROR, $e->getCode());
442 442
             $this->assertEquals(400, $e->getHttpCode());
443 443
             $this->assertTrue(strlen($e->getUuid())!=0);
Please login to merge, or discard this patch.
tests/OptimizelyPHPTest/OptimizelyApiClientTest.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -163,8 +163,7 @@
 block discarded – undo
163 163
         // refresh token, since the provided access token is invalid.
164 164
         try {
165 165
             $result = $client->sendApiRequest('/projects');        
166
-        }
167
-        catch (Exception $e) {
166
+        } catch (Exception $e) {
168 167
             $this->assertEquals(Exception::CODE_API_ERROR, $e->getCode());
169 168
             $this->assertEquals(400, $e->getHttpCode());            
170 169
         }
Please login to merge, or discard this patch.
examples/Projects/CreateProject.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,13 +60,13 @@
 block discarded – undo
60 60
                 echo "Project: $name\n";
61 61
             }
62 62
 
63
-            if ($result->getNextPage()==null)
64
-                break;
63
+            if ($result->getNextPage()==null) {
64
+                            break;
65
+            }
65 66
 
66 67
             $page ++;
67 68
         }
68
-    }
69
-    catch (Exception $e) {
69
+    } catch (Exception $e) {
70 70
         print_r($optimizelyClient->getDiagnosticsInfo());
71 71
         // Handle error.
72 72
         $code = $e->getCode();
Please login to merge, or discard this patch.