Completed
Push — master ( 5246d9...f37493 )
by James
04:14
created
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/EventFilter.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
                 case 'filter_type': $this->setFilterType($value); break;
36 36
                 case 'selector': $this->setSelector($value); break;
37 37
                 default:
38
-                    throw new Exception('Unknown option: ' . $name);
38
+                    throw new Exception('Unknown option: '.$name);
39 39
             }
40 40
         }
41 41
     }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         // Remove options with empty values
54 54
         $cleanedOptions = array();
55 55
         foreach ($options as $name=>$value) {
56
-            if ($value!==null)
56
+            if ($value !== null)
57 57
                 $cleanedOptions[$name] = $value;
58 58
         }
59 59
         
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,9 @@
 block discarded – undo
91 91
         // Remove options with empty values
92 92
         $cleanedOptions = array();
93 93
         foreach ($options as $name=>$value) {
94
-            if ($value!==null)
95
-                $cleanedOptions[$name] = $value;
94
+            if ($value!==null) {
95
+                            $cleanedOptions[$name] = $value;
96
+            }
96 97
         }
97 98
         
98 99
         return $cleanedOptions;
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/Variation.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
                 case 'variation_id': $this->setVariationId($value); break;
72 72
                 case 'weight': $this->setWeight($value); break;
73 73
                 default:
74
-                    throw new Exception('Unknown option: ' . $name);
74
+                    throw new Exception('Unknown option: '.$name);
75 75
             }
76 76
         }
77 77
     }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         // Remove options with empty values
98 98
         $cleanedOptions = array();
99 99
         foreach ($options as $name=>$value) {
100
-            if ($value!==null)
100
+            if ($value !== null)
101 101
                 $cleanedOptions[$name] = $value;
102 102
         }
103 103
         
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,9 @@
 block discarded – undo
91 91
         // Remove options with empty values
92 92
         $cleanedOptions = array();
93 93
         foreach ($options as $name=>$value) {
94
-            if ($value!==null)
95
-                $cleanedOptions[$name] = $value;
94
+            if ($value!==null) {
95
+                            $cleanedOptions[$name] = $value;
96
+            }
96 97
         }
97 98
         
98 99
         return $cleanedOptions;
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/ExperimentVariationReach.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
                     break;                
72 72
                 }
73 73
                 default:
74
-                    throw new Exception('Unknown option: ' . $name);
74
+                    throw new Exception('Unknown option: '.$name);
75 75
             }
76 76
         }
77 77
     }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         // Remove options with empty values
98 98
         $cleanedOptions = array();
99 99
         foreach ($options as $name=>$value) {
100
-            if ($value!==null)
100
+            if ($value !== null)
101 101
                 $cleanedOptions[$name] = $value;
102 102
         }
103 103
         
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,9 @@
 block discarded – undo
91 91
         // Remove options with empty values
92 92
         $cleanedOptions = array();
93 93
         foreach ($options as $name=>$value) {
94
-            if ($value!==null)
95
-                $cleanedOptions[$name] = $value;
94
+            if ($value!==null) {
95
+                            $cleanedOptions[$name] = $value;
96
+            }
96 97
         }
97 98
         
98 99
         return $cleanedOptions;
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Resource/v2/Campaign.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
                 case 'type': $this->setType($value); break;
135 135
                 case 'id': $this->setId($value); break;
136 136
                 default:
137
-                    throw new Exception('Unknown option: ' . $name);
137
+                    throw new Exception('Unknown option: '.$name);
138 138
             }
139 139
         }
140 140
     }
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
         // Remove options with empty values
173 173
         $cleanedOptions = array();
174 174
         foreach ($options as $name=>$value) {
175
-            if ($value!==null)
175
+            if ($value !== null)
176 176
                 $cleanedOptions[$name] = $value;
177 177
         }
178 178
         
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,8 +91,9 @@
 block discarded – undo
91 91
         // Remove options with empty values
92 92
         $cleanedOptions = array();
93 93
         foreach ($options as $name=>$value) {
94
-            if ($value!==null)
95
-                $cleanedOptions[$name] = $value;
94
+            if ($value!==null) {
95
+                            $cleanedOptions[$name] = $value;
96
+            }
96 97
         }
97 98
         
98 99
         return $cleanedOptions;
Please login to merge, or discard this patch.
examples/Experiments/CreateExperiment.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,6 @@
 block discarded – undo
14 14
 
15 15
 use WebMarketingROI\OptimizelyPHP\OptimizelyApiClient;
16 16
 use WebMarketingROI\OptimizelyPHP\Exception;
17
-use WebMarketingROI\OptimizelyPHP\Resource\v2\Project;
18 17
 
19 18
 // Init class autloading.
20 19
 include dirname(__FILE__) . '/../../vendor/autoload.php';
Please login to merge, or discard this patch.
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -33,73 +33,73 @@
 block discarded – undo
33 33
     $experiment = new Experiment(array(
34 34
             "project_id" => 1000,
35 35
             "audience_ids" => array(
36
-              1234,
37
-              1212,
38
-              1432
36
+                1234,
37
+                1212,
38
+                1432
39 39
             ),
40 40
             "campaign_id" => 2000,
41 41
             "changes" => array(
42
-              array(
42
+                array(
43 43
                 "type" => "custom_code",
44 44
                 "allow_additional_redirect" => true,
45 45
                 "async" => true,
46 46
                 "css_selector" => "a[href*=\"optimizely\"]",
47 47
                 "dependencies" => array(
48
-                  24,
49
-                  26
48
+                    24,
49
+                    26
50 50
                 ),
51 51
                 "destination" => "https://app.optimizely.com/",
52 52
                 "extension_id" => 1234,
53 53
                 "preserve_parameters" => true,
54 54
                 "src" => 524,
55 55
                 "value" => "window.someGlobalFunction();"
56
-              )
56
+                )
57 57
             ),
58 58
             "description" => "string",
59 59
             "holdback" => 5000,
60 60
             "key" => "home_page_experiment",
61 61
             "metrics" => array(
62
-              array(
62
+                array(
63 63
                 "kind" => "string"
64
-              )
64
+                )
65 65
             ),
66 66
             "name" => "Blue Button Experiment",
67 67
             "schedule" => array(
68
-              "start_time" => "2016-10-17T07:04:59.724Z",
69
-              "stop_time" => "2016-10-17T07:04:59.724Z",
70
-              "time_zone" => "UTC"
68
+                "start_time" => "2016-10-17T07:04:59.724Z",
69
+                "stop_time" => "2016-10-17T07:04:59.724Z",
70
+                "time_zone" => "UTC"
71 71
             ),
72 72
             "status" => "active",
73 73
             "variations" => array(
74
-              array(
74
+                array(
75 75
                 "actions" => array(
76
-                  array(
76
+                    array(
77 77
                     "changes" => array(
78
-                      array(
78
+                        array(
79 79
                         "type" => "custom_code",
80 80
                         "allow_additional_redirect" => true,
81 81
                         "async" => true,
82 82
                         "css_selector" => "a[href*=\"optimizely\"]",
83 83
                         "dependencies" => array(
84
-                          24,
85
-                          26
84
+                            24,
85
+                            26
86 86
                         ),
87 87
                         "destination" => "https://app.optimizely.com/",
88 88
                         "extension_id" => 1234,
89 89
                         "preserve_parameters" => true,
90 90
                         "src" => 524,
91 91
                         "value" => "window.someGlobalFunction();"
92
-                      )
92
+                        )
93 93
                     ),
94 94
                     "page_id" => 0
95
-                  )
95
+                    )
96 96
                 ),
97 97
                 "archived" => true,
98 98
                 "key" => "blue_button_variation",
99 99
                 "name" => "Blue Button",
100 100
                 "variation_id" => 0,
101 101
                 "weight" => 0
102
-              )
102
+                )
103 103
             )
104 104
         ));
105 105
         
Please login to merge, or discard this patch.
lib/WebMarketingROI/OptimizelyPHP/Service/v2/Campaigns.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
     /**
96 96
      * Get campaign results
97 97
      * @param integer $campaignId The id for the campaign you want results for
98
-     * @param string $starTime The earliest time to count events in results. Defaults to the time that the campaign was first activated.
98
+     * @param string $startTime The earliest time to count events in results. Defaults to the time that the campaign was first activated.
99 99
      * @param string $endTime The latest time to count events in results. Defaults to the time the campaign was last active or the current time if the campaign is still running.
100 100
      * @return Result
101 101
      * @throws Exception
Please login to merge, or discard this patch.
tests/OptimizelyPHPTest/Service/v2/EventsTest.php 2 patches
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
                             "category" => "add_to_cart",
25 25
                             "description" => "Item added to cart",
26 26
                             "event_filter" => array(
27
-                              "filter_type" => "target_selector",
28
-                              "selector" => ".menu-options"
27
+                                "filter_type" => "target_selector",
28
+                                "selector" => ".menu-options"
29 29
                             ),
30 30
                             "event_type" => "custom",
31 31
                             "key" => "add_to_cart",
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
                             "category" => "add_to_cart",
65 65
                             "description" => "Item added to cart",
66 66
                             "event_filter" => array(
67
-                              "filter_type" => "target_selector",
68
-                              "selector" => ".menu-options"
67
+                                "filter_type" => "target_selector",
68
+                                "selector" => ".menu-options"
69 69
                             ),
70 70
                             "event_type" => "custom",
71 71
                             "key" => "add_to_cart",
@@ -98,22 +98,22 @@  discard block
 block discarded – undo
98 98
                             ->getMock();
99 99
 
100 100
         $result = new Result(array(
101
-                              "event_filter" => array(
101
+                                "event_filter" => array(
102 102
                                 "filter_type" => "target_selector",
103 103
                                 "selector" => ".menu-options"
104
-                              ),
105
-                              "name" => "Add to Cart",
106
-                              "archived" => true,
107
-                              "category" => "add_to_cart",
108
-                              "description" => "string",
109
-                              "event_type" => "click",
110
-                              "key" => "add_to_cart",
111
-                              "created" => "2016-10-18T05:07:04.153Z",
112
-                              "id" => 0,
113
-                              "is_classic" => false,
114
-                              "is_editable" => true,
115
-                              "page_id" => 0,
116
-                              "project_id" => 1000
104
+                                ),
105
+                                "name" => "Add to Cart",
106
+                                "archived" => true,
107
+                                "category" => "add_to_cart",
108
+                                "description" => "string",
109
+                                "event_type" => "click",
110
+                                "key" => "add_to_cart",
111
+                                "created" => "2016-10-18T05:07:04.153Z",
112
+                                "id" => 0,
113
+                                "is_classic" => false,
114
+                                "is_editable" => true,
115
+                                "page_id" => 0,
116
+                                "project_id" => 1000
117 117
                         ), 201);
118 118
         
119 119
         $optimizelyApiClientMock->method('sendApiRequest')
@@ -122,16 +122,16 @@  discard block
 block discarded – undo
122 122
         $eventsService = new Events($optimizelyApiClientMock);
123 123
         
124 124
         $event = new ClickEvent(array(
125
-              "event_filter" => array(
125
+                "event_filter" => array(
126 126
                 "filter_type" => "target_selector",
127 127
                 "selector" => ".menu-options"
128
-              ),
129
-              "name" => "Add to Cart",
130
-              "archived" => true,
131
-              "category" => "add_to_cart",
132
-              "description" => "string",
133
-              "event_type" => "click",
134
-              "key" => "add_to_cart"
128
+                ),
129
+                "name" => "Add to Cart",
130
+                "archived" => true,
131
+                "category" => "add_to_cart",
132
+                "description" => "string",
133
+                "event_type" => "click",
134
+                "key" => "add_to_cart"
135 135
         ));
136 136
         
137 137
         $result = $eventsService->createClickEvent(0, $event);
@@ -192,22 +192,22 @@  discard block
 block discarded – undo
192 192
                             ->getMock();
193 193
 
194 194
         $result = new Result(array(
195
-                              "event_filter" => array(
195
+                                "event_filter" => array(
196 196
                                 "filter_type" => "target_selector",
197 197
                                 "selector" => ".menu-options"
198
-                              ),
199
-                              "name" => "Add to Cart",
200
-                              "archived" => true,
201
-                              "category" => "add_to_cart",
202
-                              "description" => "string",
203
-                              "event_type" => "click",
204
-                              "key" => "add_to_cart",
205
-                              "created" => "2016-10-18T05:07:04.153Z",
206
-                              "id" => 0,
207
-                              "is_classic" => false,
208
-                              "is_editable" => true,
209
-                              "page_id" => 0,
210
-                              "project_id" => 1000
198
+                                ),
199
+                                "name" => "Add to Cart",
200
+                                "archived" => true,
201
+                                "category" => "add_to_cart",
202
+                                "description" => "string",
203
+                                "event_type" => "click",
204
+                                "key" => "add_to_cart",
205
+                                "created" => "2016-10-18T05:07:04.153Z",
206
+                                "id" => 0,
207
+                                "is_classic" => false,
208
+                                "is_editable" => true,
209
+                                "page_id" => 0,
210
+                                "project_id" => 1000
211 211
                         ), 200);
212 212
         
213 213
         $optimizelyApiClientMock->method('sendApiRequest')
@@ -216,16 +216,16 @@  discard block
 block discarded – undo
216 216
         $eventsService = new Events($optimizelyApiClientMock);
217 217
         
218 218
         $event = new ClickEvent(array(
219
-              "event_filter" => array(
219
+                "event_filter" => array(
220 220
                 "filter_type" => "target_selector",
221 221
                 "selector" => ".menu-options"
222
-              ),
223
-              "name" => "Add to Cart",
224
-              "archived" => true,
225
-              "category" => "add_to_cart",
226
-              "description" => "string",
227
-              "event_type" => "click",
228
-              "key" => "add_to_cart"
222
+                ),
223
+                "name" => "Add to Cart",
224
+                "archived" => true,
225
+                "category" => "add_to_cart",
226
+                "description" => "string",
227
+                "event_type" => "click",
228
+                "key" => "add_to_cart"
229 229
         ));
230 230
         
231 231
         $result = $eventsService->updateClickEvent(0, 0, $event);
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
         $result = $eventsService->listAll(1000, true);
48 48
         $events = $result->getPayload();
49 49
         
50
-        $this->assertTrue(count($events)==1);
50
+        $this->assertTrue(count($events) == 1);
51 51
         $this->assertTrue($events[0] instanceOf Event);
52
-        $this->assertTrue($events[0]->getName()=='Add to Cart');        
52
+        $this->assertTrue($events[0]->getName() == 'Add to Cart');        
53 53
     }
54 54
     
55 55
     public function testGet()
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         $event = $result->getPayload();
88 88
         
89 89
         $this->assertTrue($event instanceOf Event);
90
-        $this->assertTrue($event->getName()=='Add to Cart');        
90
+        $this->assertTrue($event->getName() == 'Add to Cart');        
91 91
     }
92 92
     
93 93
     public function testCreateClickEvent()
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         $createdEvent = $result->getPayload();
139 139
         
140 140
         $this->assertTrue($createdEvent instanceOf ClickEvent);
141
-        $this->assertTrue($createdEvent->getName()=='Add to Cart');                
141
+        $this->assertTrue($createdEvent->getName() == 'Add to Cart');                
142 142
     }
143 143
     
144 144
     public function testCreateCustomEvent()
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         $createdEvent = $result->getPayload();
182 182
         
183 183
         $this->assertTrue($createdEvent instanceOf CustomEvent);
184
-        $this->assertTrue($createdEvent->getName()=='Loaded New App');                
184
+        $this->assertTrue($createdEvent->getName() == 'Loaded New App');                
185 185
     }
186 186
     
187 187
     public function testUpdateClickEvent()
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
         $updatedEvent = $result->getPayload();
233 233
         
234 234
         $this->assertTrue($updatedEvent instanceOf ClickEvent);
235
-        $this->assertTrue($updatedEvent->getName()=='Add to Cart');                
235
+        $this->assertTrue($updatedEvent->getName() == 'Add to Cart');                
236 236
     }
237 237
     
238 238
     public function testUpdateCustomEvent()
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
         $updatedEvent = $result->getPayload();
276 276
         
277 277
         $this->assertTrue($updatedEvent instanceOf CustomEvent);
278
-        $this->assertTrue($updatedEvent->getName()=='Loaded New App');                
278
+        $this->assertTrue($updatedEvent->getName() == 'Loaded New App');                
279 279
     }
280 280
 }
281 281
 
Please login to merge, or discard this patch.
tests/OptimizelyPHPTest/Service/v2/ExperimentsTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -109,9 +109,9 @@  discard block
 block discarded – undo
109 109
         $result = $experimentsService->listAll(1000);
110 110
         $experiments = $result->getPayload();
111 111
         
112
-        $this->assertTrue(count($experiments)==1);
112
+        $this->assertTrue(count($experiments) == 1);
113 113
         $this->assertTrue($experiments[0] instanceOf Experiment);
114
-        $this->assertTrue($experiments[0]->getName()=='Blue Button Experiment');        
114
+        $this->assertTrue($experiments[0]->getName() == 'Blue Button Experiment');        
115 115
     }
116 116
     
117 117
     /**
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
         $experiment = $result->getPayload();
256 256
         
257 257
         $this->assertTrue($experiment instanceOf Experiment);
258
-        $this->assertTrue($experiment->getName()=='Blue Button Experiment');        
258
+        $this->assertTrue($experiment->getName() == 'Blue Button Experiment');        
259 259
     }
260 260
     
261 261
     /**
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
         $experimentResults = $result->getPayload();
370 370
         
371 371
         $this->assertTrue($experimentResults instanceOf ExperimentResults);
372
-        $this->assertTrue($experimentResults->getConfidenceThreshold()==0.9);        
372
+        $this->assertTrue($experimentResults->getConfidenceThreshold() == 0.9);        
373 373
     }
374 374
     
375 375
     public function testCreate()
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
         $createdExperiment = $result->getPayload();
542 542
         
543 543
         $this->assertTrue($createdExperiment instanceOf Experiment);
544
-        $this->assertTrue($createdExperiment->getName()=='Blue Button Experiment');                
544
+        $this->assertTrue($createdExperiment->getName() == 'Blue Button Experiment');                
545 545
     }
546 546
     
547 547
     public function testUpdate()
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
         $updatedExperiment = $result->getPayload();
710 710
         
711 711
         $this->assertTrue($updatedExperiment instanceOf Experiment);
712
-        $this->assertTrue($updatedExperiment->getName()=='Blue Button Experiment');                
712
+        $this->assertTrue($updatedExperiment->getName() == 'Blue Button Experiment');                
713 713
     }
714 714
     
715 715
     public function testDelete()
Please login to merge, or discard this patch.
tests/OptimizelyPHPTest/Service/v2/CampaignsTest.php 2 patches
Indentation   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -21,14 +21,14 @@  discard block
 block discarded – undo
21 21
                         array(
22 22
                             "project_id" => 1000,
23 23
                             "changes" => array(
24
-                              array(
24
+                                array(
25 25
                                 "type" => "custom_code",
26 26
                                 "allow_additional_redirect" => true,
27 27
                                 "async" => true,
28 28
                                 "css_selector" => "a[href*=\"optimizely\"]",
29 29
                                 "dependencies" => array(
30
-                                  24,
31
-                                  26
30
+                                    24,
31
+                                    26
32 32
                                 ),
33 33
                                 "destination" => "https://app.optimizely.com/",
34 34
                                 "extension_id" => 1234,
@@ -36,30 +36,30 @@  discard block
 block discarded – undo
36 36
                                 "src" => 524,
37 37
                                 "value" => "window.someGlobalFunction();",
38 38
                                 "id" => "string"
39
-                              )
39
+                                )
40 40
                             ),
41 41
                             "created" => "2016-10-18T03:27:04.123Z",
42 42
                             "earliest" => "2016-10-18T03:27:04.123Z",
43 43
                             "experiment_ids" => array(
44
-                              0
44
+                                0
45 45
                             ),
46 46
                             "holdback" => 0,
47 47
                             "last_modified" => "2016-10-18T03:27:04.123Z",
48 48
                             "latest" => "2016-10-18T03:27:04.123Z",
49 49
                             "metrics" => array(
50
-                              array(
50
+                                array(
51 51
                                 "kind" => "string",
52 52
                                 "id" => 0
53
-                              )
53
+                                )
54 54
                             ),
55 55
                             "name" => "Landing Page Optimization",
56 56
                             "page_ids" => array(
57
-                              0
57
+                                0
58 58
                             ),
59 59
                             "status" => "active",
60 60
                             "type" => "a/b",
61 61
                             "id" => 2000
62
-                          )
62
+                            )
63 63
                         ), 200);
64 64
         
65 65
         $optimizelyApiClientMock->method('sendApiRequest')
@@ -115,14 +115,14 @@  discard block
 block discarded – undo
115 115
         $result = new Result(array(
116 116
                             "project_id" => 1000,
117 117
                             "changes" => array(
118
-                              array(
118
+                                array(
119 119
                                 "type" => "custom_code",
120 120
                                 "allow_additional_redirect" => true,
121 121
                                 "async" => true,
122 122
                                 "css_selector" => "a[href*=\"optimizely\"]",
123 123
                                 "dependencies" => array(
124
-                                  24,
125
-                                  26
124
+                                    24,
125
+                                    26
126 126
                                 ),
127 127
                                 "destination" => "https://app.optimizely.com/",
128 128
                                 "extension_id" => 1234,
@@ -130,25 +130,25 @@  discard block
 block discarded – undo
130 130
                                 "src" => 524,
131 131
                                 "value" => "window.someGlobalFunction();",
132 132
                                 "id" => "string"
133
-                              )
133
+                                )
134 134
                             ),
135 135
                             "created" => "2016-10-18T03:27:04.139Z",
136 136
                             "earliest" => "2016-10-18T03:27:04.139Z",
137 137
                             "experiment_ids" => array(
138
-                              0
138
+                                0
139 139
                             ),
140 140
                             "holdback" => 0,
141 141
                             "last_modified" => "2016-10-18T03:27:04.139Z",
142 142
                             "latest" => "2016-10-18T03:27:04.139Z",
143 143
                             "metrics" => array(
144
-                              array(
144
+                                array(
145 145
                                 "kind" => "string",
146 146
                                 "id" => 0
147
-                              )
147
+                                )
148 148
                             ),
149 149
                             "name" => "Landing Page Optimization",
150 150
                             "page_ids" => array(
151
-                              0
151
+                                0
152 152
                             ),
153 153
                             "status" => "active",
154 154
                             "type" => "a/b",
@@ -179,47 +179,47 @@  discard block
 block discarded – undo
179 179
                             "confidence_threshold" => 0,
180 180
                             "end_time" => "2016-10-18T03:27:04.147Z",
181 181
                             "metrics" => array(
182
-                              array(
182
+                                array(
183 183
                                 "event" => "string",
184 184
                                 "event_name" => "string",
185 185
                                 "measure" => "conversions",
186 186
                                 "metric_id" => "string",
187 187
                                 "priority" => 0,
188 188
                                 "results" => array(
189
-                                  "campaign" => array(
189
+                                    "campaign" => array(
190 190
                                     "experiment_id" => 0,
191 191
                                     "is_baseline" => true,
192 192
                                     "lift" => array(
193
-                                      "confidence_interval" => array(
193
+                                        "confidence_interval" => array(
194 194
                                         0.010399560300730457,
195 195
                                         0.0850821459929161
196
-                                      ),
197
-                                      "is_most_conclusive" => true,
198
-                                      "is_significant" => true,
199
-                                      "significance" => 0,
200
-                                      "value" => 0,
201
-                                      "visitors_remaining" => 0
196
+                                        ),
197
+                                        "is_most_conclusive" => true,
198
+                                        "is_significant" => true,
199
+                                        "significance" => 0,
200
+                                        "value" => 0,
201
+                                        "visitors_remaining" => 0
202 202
                                     ),
203 203
                                     "name" => "Blue Button",
204 204
                                     "rate" => 0,
205 205
                                     "scope" => "variation",
206 206
                                     "total_increase" => array(
207
-                                      "confidence_interval" => array(
207
+                                        "confidence_interval" => array(
208 208
                                         0.010399560300730457,
209 209
                                         0.0850821459929161
210
-                                      ),
211
-                                      "is_most_conclusive" => true,
212
-                                      "is_significant" => true,
213
-                                      "significance" => 0,
214
-                                      "value" => 0,
215
-                                      "visitors_remaining" => 0
210
+                                        ),
211
+                                        "is_most_conclusive" => true,
212
+                                        "is_significant" => true,
213
+                                        "significance" => 0,
214
+                                        "value" => 0,
215
+                                        "visitors_remaining" => 0
216 216
                                     ),
217 217
                                     "value" => 0,
218 218
                                     "variation_id" => "string"
219
-                                  )
219
+                                    )
220 220
                                 ),
221 221
                                 "unit" => "session"
222
-                              )
222
+                                )
223 223
                             ),
224 224
                             "start_time" => "2016-10-18T03:27:04.148Z"
225 225
                         ), 200);
@@ -247,14 +247,14 @@  discard block
 block discarded – undo
247 247
         $result = new Result(array(
248 248
                             "project_id" => 1000,
249 249
                             "changes" => array(
250
-                              array(
250
+                                array(
251 251
                                 "type" => "custom_code",
252 252
                                 "allow_additional_redirect" => true, 
253 253
                                 "async" => true,
254 254
                                 "css_selector" => "a[href*=\"optimizely\"]",
255 255
                                 "dependencies" => array(
256
-                                  24,
257
-                                  26
256
+                                    24,
257
+                                    26
258 258
                                 ),
259 259
                                 "destination" => "https://app.optimizely.com/",
260 260
                                 "extension_id" => 1234,
@@ -262,25 +262,25 @@  discard block
 block discarded – undo
262 262
                                 "src" => 524,
263 263
                                 "value" => "window.someGlobalFunction();",
264 264
                                 "id" => "string"
265
-                              )
265
+                                )
266 266
                             ),
267 267
                             "created" => "2016-10-18T03:27:04.155Z",
268 268
                             "earliest" => "2016-10-18T03:27:04.155Z",
269 269
                             "experiment_ids" => array(
270
-                              0
270
+                                0
271 271
                             ),
272 272
                             "holdback" => 0,
273 273
                             "last_modified" => "2016-10-18T03:27:04.155Z",
274 274
                             "latest" => "2016-10-18T03:27:04.155Z",
275 275
                             "metrics" => array(
276
-                              array(
276
+                                array(
277 277
                                 "kind" => "string",
278 278
                                 "id" => 0
279
-                              )
279
+                                )
280 280
                             ),
281 281
                             "name" => "Landing Page Optimization",
282 282
                             "page_ids" => array(
283
-                              0
283
+                                0
284 284
                             ),
285 285
                             "status" => "active",
286 286
                             "type" => "a/b",
@@ -295,38 +295,38 @@  discard block
 block discarded – undo
295 295
         $campaign = new Campaign(array(
296 296
                 "project_id" => 1000,
297 297
                 "changes" => array(
298
-                  array(
298
+                    array(
299 299
                     "type" => "custom_code",
300 300
                     "allow_additional_redirect" => true,
301 301
                     "async" => true,
302 302
                     "css_selector" => "a[href*=\"optimizely\"]",
303 303
                     "dependencies" => array(
304
-                      24,
305
-                      26
304
+                        24,
305
+                        26
306 306
                     ),
307 307
                     "destination" => "https://app.optimizely.com/",
308 308
                     "extension_id" => 1234,
309 309
                     "preserve_parameters" => true,
310 310
                     "src" => 524,
311 311
                     "value" => "window.someGlobalFunction();"
312
-                  )
312
+                    )
313 313
                 ),
314 314
                 "created" => "2016-10-18T03:27:04.067Z",
315 315
                 "earliest" => "2016-10-18T03:27:04.067Z",
316 316
                 "experiment_ids" => array(
317
-                  0
317
+                    0
318 318
                 ),
319 319
                 "holdback" => 0,
320 320
                 "last_modified" => "2016-10-18T03:27:04.067Z",
321 321
                 "latest" => "2016-10-18T03:27:04.067Z",
322 322
                 "metrics" => array(
323
-                  array(
323
+                    array(
324 324
                     "kind" => "string"
325
-                  )
325
+                    )
326 326
                 ),
327 327
                 "name" => "Landing Page Optimization",
328 328
                 "page_ids" => array(
329
-                  0
329
+                    0
330 330
                 ),
331 331
                 "status" => "active",
332 332
                 "type" => "a/b"
@@ -349,14 +349,14 @@  discard block
 block discarded – undo
349 349
         $result = new Result(array(
350 350
                             "project_id" => 1000,
351 351
                             "changes" => array(
352
-                              array(
352
+                                array(
353 353
                                 "type" => "custom_code",
354 354
                                 "allow_additional_redirect" => true, 
355 355
                                 "async" => true,
356 356
                                 "css_selector" => "a[href*=\"optimizely\"]",
357 357
                                 "dependencies" => array(
358
-                                  24,
359
-                                  26
358
+                                    24,
359
+                                    26
360 360
                                 ),
361 361
                                 "destination" => "https://app.optimizely.com/",
362 362
                                 "extension_id" => 1234,
@@ -364,25 +364,25 @@  discard block
 block discarded – undo
364 364
                                 "src" => 524,
365 365
                                 "value" => "window.someGlobalFunction();",
366 366
                                 "id" => "string"
367
-                              )
367
+                                )
368 368
                             ),
369 369
                             "created" => "2016-10-18T03:27:04.155Z",
370 370
                             "earliest" => "2016-10-18T03:27:04.155Z",
371 371
                             "experiment_ids" => array(
372
-                              0
372
+                                0
373 373
                             ),
374 374
                             "holdback" => 0,
375 375
                             "last_modified" => "2016-10-18T03:27:04.155Z",
376 376
                             "latest" => "2016-10-18T03:27:04.155Z",
377 377
                             "metrics" => array(
378
-                              array(
378
+                                array(
379 379
                                 "kind" => "string",
380 380
                                 "id" => 0
381
-                              )
381
+                                )
382 382
                             ),
383 383
                             "name" => "Landing Page Optimization",
384 384
                             "page_ids" => array(
385
-                              0
385
+                                0
386 386
                             ),
387 387
                             "status" => "active",
388 388
                             "type" => "a/b",
@@ -397,38 +397,38 @@  discard block
 block discarded – undo
397 397
         $campaign = new Campaign(array(
398 398
                 "project_id" => 1000,
399 399
                 "changes" => array(
400
-                  array(
400
+                    array(
401 401
                     "type" => "custom_code",
402 402
                     "allow_additional_redirect" => true,
403 403
                     "async" => true,
404 404
                     "css_selector" => "a[href*=\"optimizely\"]",
405 405
                     "dependencies" => array(
406
-                      24,
407
-                      26
406
+                        24,
407
+                        26
408 408
                     ),
409 409
                     "destination" => "https://app.optimizely.com/",
410 410
                     "extension_id" => 1234,
411 411
                     "preserve_parameters" => true,
412 412
                     "src" => 524,
413 413
                     "value" => "window.someGlobalFunction();"
414
-                  )
414
+                    )
415 415
                 ),
416 416
                 "created" => "2016-10-18T03:27:04.067Z",
417 417
                 "earliest" => "2016-10-18T03:27:04.067Z",
418 418
                 "experiment_ids" => array(
419
-                  0
419
+                    0
420 420
                 ),
421 421
                 "holdback" => 0,
422 422
                 "last_modified" => "2016-10-18T03:27:04.067Z",
423 423
                 "latest" => "2016-10-18T03:27:04.067Z",
424 424
                 "metrics" => array(
425
-                  array(
425
+                    array(
426 426
                     "kind" => "string"
427
-                  )
427
+                    )
428 428
                 ),
429 429
                 "name" => "Landing Page Optimization",
430 430
                 "page_ids" => array(
431
-                  0
431
+                    0
432 432
                 ),
433 433
                 "status" => "active",
434 434
                 "type" => "a/b"
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -70,9 +70,9 @@  discard block
 block discarded – undo
70 70
         $result = $campaignsService->listAll(1000);
71 71
         $campaigns = $result->getPayload();
72 72
         
73
-        $this->assertTrue(count($campaigns)==1);
73
+        $this->assertTrue(count($campaigns) == 1);
74 74
         $this->assertTrue($campaigns[0] instanceOf Campaign);
75
-        $this->assertTrue($campaigns[0]->getName()=='Landing Page Optimization');        
75
+        $this->assertTrue($campaigns[0]->getName() == 'Landing Page Optimization');        
76 76
     }
77 77
     
78 78
     /**
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         $campaign = $result->getPayload();
165 165
         
166 166
         $this->assertTrue($campaign instanceOf Campaign);
167
-        $this->assertTrue($campaign->getName()=='Landing Page Optimization');        
167
+        $this->assertTrue($campaign->getName() == 'Landing Page Optimization');        
168 168
     }
169 169
     
170 170
     public function testGetResults()
@@ -233,8 +233,8 @@  discard block
 block discarded – undo
233 233
         $campaignResults = $result->getPayload();
234 234
         
235 235
         $this->assertTrue($campaignResults instanceOf CampaignResults);
236
-        $this->assertTrue($campaignResults->getConfidenceThreshold()==0);        
237
-        $this->assertTrue($campaignResults->getStartTime()=="2016-10-18T03:27:04.148Z");        
236
+        $this->assertTrue($campaignResults->getConfidenceThreshold() == 0);        
237
+        $this->assertTrue($campaignResults->getStartTime() == "2016-10-18T03:27:04.148Z");        
238 238
     }
239 239
     
240 240
     public function testCreate()
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
         $createdCampaign = $result->getPayload();
337 337
         
338 338
         $this->assertTrue($createdCampaign instanceOf Campaign);
339
-        $this->assertTrue($createdCampaign->getName()=='Landing Page Optimization');                
339
+        $this->assertTrue($createdCampaign->getName() == 'Landing Page Optimization');                
340 340
     }
341 341
     
342 342
     public function testUpdate()
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
         $updatedCampaign = $result->getPayload();
439 439
                  
440 440
         $this->assertTrue($updatedCampaign instanceOf Campaign);
441
-        $this->assertTrue($updatedCampaign->getName()=='Landing Page Optimization');                
441
+        $this->assertTrue($updatedCampaign->getName() == 'Landing Page Optimization');                
442 442
     }
443 443
     
444 444
     public function testDelete()
Please login to merge, or discard this patch.