Completed
Push — master ( ca977e...979a9d )
by Oleg
02:31
created
examples/Campaigns/CreateCampaign.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,26 +42,26 @@
 block discarded – undo
42 42
     $campaign = new Campaign(array(
43 43
             "project_id" => $projectId,
44 44
             "changes" => array(
45
-              array(
45
+                array(
46 46
                 "type" => "custom_code",
47 47
                 "value" => "window.someGlobalFunction();"
48
-              )
48
+                )
49 49
             ),
50 50
             "experiment_ids" => array(
51
-              0
51
+                0
52 52
             ),
53 53
             "holdback" => 0,
54 54
             "metrics" => array(
55
-              array(
55
+                array(
56 56
                 "aggregator" => "sum",
57 57
                 "event_id" => 0,
58 58
                 "field" => "revenue",
59 59
                 "scope" => "session"
60
-              )
60
+                )
61 61
             ),
62 62
             "name" => "Landing Page Optimization",
63 63
             "page_ids" => array(
64
-              $pageId,
64
+                $pageId,
65 65
             ),
66 66
             "status" => "not_started",
67 67
             "type" => "a/b"
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,14 +17,14 @@  discard block
 block discarded – undo
17 17
 use WebMarketingROI\OptimizelyPHP\Resource\v2\Campaign;
18 18
 
19 19
 // Init class autloading.
20
-include dirname(__FILE__) . '/../../vendor/autoload.php';
20
+include dirname(__FILE__).'/../../vendor/autoload.php';
21 21
 
22 22
 // Include Utils.php - a file containing helper functions
23
-include dirname(__FILE__) . '/../Utils.php';
23
+include dirname(__FILE__).'/../Utils.php';
24 24
 
25 25
 // Read project ID from command line.
26
-if ($argc!=3) {
27
-    die('Expected 2 command-line argument, while got ' . $argc-1);
26
+if ($argc != 3) {
27
+    die('Expected 2 command-line argument, while got '.$argc - 1);
28 28
 }
29 29
 
30 30
 $projectId = $argv[1];
@@ -81,6 +81,6 @@  discard block
 block discarded – undo
81 81
 
82 82
 // Save access token for later use
83 83
 $accessToken = $optimizelyClient->getAccessToken();
84
-file_put_contents(dirname(__FILE__) . '/../access_token.json', json_encode($accessToken));
84
+file_put_contents(dirname(__FILE__).'/../access_token.json', json_encode($accessToken));
85 85
 
86 86
 echo "Done!\n";
Please login to merge, or discard this patch.
examples/Audiences/CreateAudience.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,14 +17,14 @@  discard block
 block discarded – undo
17 17
 use WebMarketingROI\OptimizelyPHP\Resource\v2\Audience;
18 18
 
19 19
 // Init class autloading.
20
-include dirname(__FILE__) . '/../../vendor/autoload.php';
20
+include dirname(__FILE__).'/../../vendor/autoload.php';
21 21
 
22 22
 // Include Utils.php - a file containing helper functions
23
-include dirname(__FILE__) . '/../Utils.php';
23
+include dirname(__FILE__).'/../Utils.php';
24 24
 
25 25
 // Read project ID from command line.
26
-if ($argc!=2) {
27
-    die('Expected 1 command-line argument, while got ' . $argc-1);
26
+if ($argc != 2) {
27
+    die('Expected 1 command-line argument, while got '.$argc - 1);
28 28
 }
29 29
 
30 30
 $projectId = $argv[1];
@@ -59,6 +59,6 @@  discard block
 block discarded – undo
59 59
 
60 60
 // Save access token for later use
61 61
 $accessToken = $optimizelyClient->getAccessToken();
62
-file_put_contents(dirname(__FILE__) . '/../access_token.json', json_encode($accessToken));
62
+file_put_contents(dirname(__FILE__).'/../access_token.json', json_encode($accessToken));
63 63
 
64 64
 echo "Done!\n";
Please login to merge, or discard this patch.
examples/Audiences/GetAudiences.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -16,14 +16,14 @@  discard block
 block discarded – undo
16 16
 use WebMarketingROI\OptimizelyPHP\Exception;
17 17
 
18 18
 // Init class autloading.
19
-include dirname(__FILE__) . '/../../vendor/autoload.php';
19
+include dirname(__FILE__).'/../../vendor/autoload.php';
20 20
 
21 21
 // Include Utils.php - a file containing helper functions
22
-include dirname(__FILE__) . '/../Utils.php';
22
+include dirname(__FILE__).'/../Utils.php';
23 23
 
24 24
 // Read project ID from command line.
25
-if ($argc!=2) {
26
-    die('Expected 1 command-line argument, while got ' . $argc-1);
25
+if ($argc != 2) {
26
+    die('Expected 1 command-line argument, while got '.$argc - 1);
27 27
 }
28 28
 $projectId = $argv[1];
29 29
 
@@ -47,17 +47,17 @@  discard block
 block discarded – undo
47 47
         $audiences = $result->getPayload();
48 48
         
49 49
         foreach ($audiences as $audience) {
50
-            echo "Name: " . $audience->getName() . "\n";
51
-            echo "Conditions: " . $audience->getConditions() . "\n";
50
+            echo "Name: ".$audience->getName()."\n";
51
+            echo "Conditions: ".$audience->getConditions()."\n";
52 52
             echo "\n";
53 53
         }
54 54
     
55 55
         // Determine if there are more audiences.
56
-        if ($result->getNextPage()==null)
56
+        if ($result->getNextPage() == null)
57 57
             break;
58 58
         
59 59
         // Increment page counter.
60
-        $page ++;
60
+        $page++;
61 61
     }    
62 62
     
63 63
 } catch (Exception $e) {
@@ -71,6 +71,6 @@  discard block
 block discarded – undo
71 71
 
72 72
 // Save access token for later use
73 73
 $accessToken = $optimizelyClient->getAccessToken();
74
-file_put_contents(dirname(__FILE__) . '/../access_token.json', json_encode($accessToken));
74
+file_put_contents(dirname(__FILE__).'/../access_token.json', json_encode($accessToken));
75 75
 
76 76
 echo "Done!\n";
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,9 @@
 block discarded – undo
53 53
         }
54 54
     
55 55
         // Determine if there are more audiences.
56
-        if ($result->getNextPage()==null)
57
-            break;
56
+        if ($result->getNextPage()==null) {
57
+                    break;
58
+        }
58 59
         
59 60
         // Increment page counter.
60 61
         $page ++;
Please login to merge, or discard this patch.