Completed
Push — master ( b0aab6...90835e )
by James
02:41
created
examples/Utils.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
     $credentials = file_get_contents(dirname(__FILE__) . '/auth_credentials.json');
10 10
     if ($credentials===false) {
11 11
         die ("Couldn't read OAuth credentials from auth_credentials.json. Make sure " .
12
-             "the file exists (if not, copy from auth_credentials.json.dist).");
12
+                "the file exists (if not, copy from auth_credentials.json.dist).");
13 13
     }
14 14
 
15 15
     $credentials = json_decode($credentials, true);
Please login to merge, or discard this patch.
examples/Experiments/CreateExperiment.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -32,73 +32,73 @@
 block discarded – undo
32 32
     $project = new Experiment(array(
33 33
             "project_id" => 1000,
34 34
             "audience_ids" => array(
35
-              1234,
36
-              1212,
37
-              1432
35
+                1234,
36
+                1212,
37
+                1432
38 38
             ),
39 39
             "campaign_id" => 2000,
40 40
             "changes" => array(
41
-              array(
41
+                array(
42 42
                 "type" => "custom_code",
43 43
                 "allow_additional_redirect" => true,
44 44
                 "async" => true,
45 45
                 "css_selector" => "a[href*=\"optimizely\"]",
46 46
                 "dependencies" => array(
47
-                  24,
48
-                  26
47
+                    24,
48
+                    26
49 49
                 ),
50 50
                 "destination" => "https://app.optimizely.com/",
51 51
                 "extension_id" => 1234,
52 52
                 "preserve_parameters" => true,
53 53
                 "src" => 524,
54 54
                 "value" => "window.someGlobalFunction();"
55
-              )
55
+                )
56 56
             ),
57 57
             "description" => "string",
58 58
             "holdback" => 5000,
59 59
             "key" => "home_page_experiment",
60 60
             "metrics" => array(
61
-              array(
61
+                array(
62 62
                 "kind" => "string"
63
-              )
63
+                )
64 64
             ),
65 65
             "name" => "Blue Button Experiment",
66 66
             "schedule" => array(
67
-              "start_time" => "2016-10-17T07:04:59.724Z",
68
-              "stop_time" => "2016-10-17T07:04:59.724Z",
69
-              "time_zone" => "UTC"
67
+                "start_time" => "2016-10-17T07:04:59.724Z",
68
+                "stop_time" => "2016-10-17T07:04:59.724Z",
69
+                "time_zone" => "UTC"
70 70
             ),
71 71
             "status" => "active",
72 72
             "variations" => array(
73
-              array(
73
+                array(
74 74
                 "actions" => array(
75
-                  array(
75
+                    array(
76 76
                     "changes" => array(
77
-                      array(
77
+                        array(
78 78
                         "type" => "custom_code",
79 79
                         "allow_additional_redirect" => true,
80 80
                         "async" => true,
81 81
                         "css_selector" => "a[href*=\"optimizely\"]",
82 82
                         "dependencies" => array(
83
-                          24,
84
-                          26
83
+                            24,
84
+                            26
85 85
                         ),
86 86
                         "destination" => "https://app.optimizely.com/",
87 87
                         "extension_id" => 1234,
88 88
                         "preserve_parameters" => true,
89 89
                         "src" => 524,
90 90
                         "value" => "window.someGlobalFunction();"
91
-                      )
91
+                        )
92 92
                     ),
93 93
                     "page_id" => 0
94
-                  )
94
+                    )
95 95
                 ),
96 96
                 "archived" => true,
97 97
                 "key" => "blue_button_variation",
98 98
                 "name" => "Blue Button",
99 99
                 "variation_id" => 0,
100 100
                 "weight" => 0
101
-              )
101
+                )
102 102
             )
103 103
         ));
104 104
         
Please login to merge, or discard this patch.
tests/OptimizelyPHPTest/Service/v2/EventsTest.php 1 patch
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",
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
                             "category" => "add_to_cart",
62 62
                             "description" => "Item added to cart",
63 63
                             "event_filter" => array(
64
-                              "filter_type" => "target_selector",
65
-                              "selector" => ".menu-options"
64
+                                "filter_type" => "target_selector",
65
+                                "selector" => ".menu-options"
66 66
                             ),
67 67
                             "event_type" => "custom",
68 68
                             "key" => "add_to_cart",
@@ -92,37 +92,37 @@  discard block
 block discarded – undo
92 92
 
93 93
         $optimizelyApiClientMock->method('sendApiRequest')
94 94
                     ->willReturn(array(
95
-                              "event_filter" => array(
95
+                                "event_filter" => array(
96 96
                                 "filter_type" => "target_selector",
97 97
                                 "selector" => ".menu-options"
98
-                              ),
99
-                              "name" => "Add to Cart",
100
-                              "archived" => true,
101
-                              "category" => "add_to_cart",
102
-                              "description" => "string",
103
-                              "event_type" => "click",
104
-                              "key" => "add_to_cart",
105
-                              "created" => "2016-10-18T05:07:04.153Z",
106
-                              "id" => 0,
107
-                              "is_classic" => false,
108
-                              "is_editable" => true,
109
-                              "page_id" => 0,
110
-                              "project_id" => 1000
98
+                                ),
99
+                                "name" => "Add to Cart",
100
+                                "archived" => true,
101
+                                "category" => "add_to_cart",
102
+                                "description" => "string",
103
+                                "event_type" => "click",
104
+                                "key" => "add_to_cart",
105
+                                "created" => "2016-10-18T05:07:04.153Z",
106
+                                "id" => 0,
107
+                                "is_classic" => false,
108
+                                "is_editable" => true,
109
+                                "page_id" => 0,
110
+                                "project_id" => 1000
111 111
                         ));
112 112
         
113 113
         $eventsService = new Events($optimizelyApiClientMock);
114 114
         
115 115
         $event = new ClickEvent(array(
116
-              "event_filter" => array(
116
+                "event_filter" => array(
117 117
                 "filter_type" => "target_selector",
118 118
                 "selector" => ".menu-options"
119
-              ),
120
-              "name" => "Add to Cart",
121
-              "archived" => true,
122
-              "category" => "add_to_cart",
123
-              "description" => "string",
124
-              "event_type" => "click",
125
-              "key" => "add_to_cart"
119
+                ),
120
+                "name" => "Add to Cart",
121
+                "archived" => true,
122
+                "category" => "add_to_cart",
123
+                "description" => "string",
124
+                "event_type" => "click",
125
+                "key" => "add_to_cart"
126 126
         ));
127 127
         
128 128
         $createdEvent = $eventsService->createClickEvent(0, $event);
@@ -180,37 +180,37 @@  discard block
 block discarded – undo
180 180
 
181 181
         $optimizelyApiClientMock->method('sendApiRequest')
182 182
                     ->willReturn(array(
183
-                              "event_filter" => array(
183
+                                "event_filter" => array(
184 184
                                 "filter_type" => "target_selector",
185 185
                                 "selector" => ".menu-options"
186
-                              ),
187
-                              "name" => "Add to Cart",
188
-                              "archived" => true,
189
-                              "category" => "add_to_cart",
190
-                              "description" => "string",
191
-                              "event_type" => "click",
192
-                              "key" => "add_to_cart",
193
-                              "created" => "2016-10-18T05:07:04.153Z",
194
-                              "id" => 0,
195
-                              "is_classic" => false,
196
-                              "is_editable" => true,
197
-                              "page_id" => 0,
198
-                              "project_id" => 1000
186
+                                ),
187
+                                "name" => "Add to Cart",
188
+                                "archived" => true,
189
+                                "category" => "add_to_cart",
190
+                                "description" => "string",
191
+                                "event_type" => "click",
192
+                                "key" => "add_to_cart",
193
+                                "created" => "2016-10-18T05:07:04.153Z",
194
+                                "id" => 0,
195
+                                "is_classic" => false,
196
+                                "is_editable" => true,
197
+                                "page_id" => 0,
198
+                                "project_id" => 1000
199 199
                         ));
200 200
         
201 201
         $eventsService = new Events($optimizelyApiClientMock);
202 202
         
203 203
         $event = new ClickEvent(array(
204
-              "event_filter" => array(
204
+                "event_filter" => array(
205 205
                 "filter_type" => "target_selector",
206 206
                 "selector" => ".menu-options"
207
-              ),
208
-              "name" => "Add to Cart",
209
-              "archived" => true,
210
-              "category" => "add_to_cart",
211
-              "description" => "string",
212
-              "event_type" => "click",
213
-              "key" => "add_to_cart"
207
+                ),
208
+                "name" => "Add to Cart",
209
+                "archived" => true,
210
+                "category" => "add_to_cart",
211
+                "description" => "string",
212
+                "event_type" => "click",
213
+                "key" => "add_to_cart"
214 214
         ));
215 215
         
216 216
         $updatedEvent = $eventsService->updateClickEvent(0, 0, $event);
Please login to merge, or discard this patch.
tests/OptimizelyPHPTest/Service/v2/AudiencesTest.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -21,15 +21,15 @@  discard block
 block discarded – undo
21 21
                             "project_id" => 1000,
22 22
                             "archived" => false,
23 23
                             "conditions" => array(
24
-                              "and",
25
-                              array(
24
+                                "and",
25
+                                array(
26 26
                                 "type" => "language",
27 27
                                 "value" => "es"
28
-                              ),
29
-                              array(
28
+                                ),
29
+                                array(
30 30
                                 "type" => "location",
31 31
                                 "value" => "US-CA-SANFRANCISCO"
32
-                              )
32
+                                )
33 33
                             ),
34 34
                             "description" => "People that speak spanish and are in San Francisco",
35 35
                             "name" => "Spanish speaking San Franciscans",
@@ -61,15 +61,15 @@  discard block
 block discarded – undo
61 61
                             "project_id" => 1000,
62 62
                             "archived" => false,
63 63
                             "conditions" => array(
64
-                              "and",
65
-                              array(
64
+                                "and",
65
+                                array(
66 66
                                 "type" => "language",
67 67
                                 "value" => "es"
68
-                              ),
69
-                              array(
68
+                                ),
69
+                                array(
70 70
                                 "type" => "location",
71 71
                                 "value" => "US-CA-SANFRANCISCO"
72
-                              )
72
+                                )
73 73
                             ),
74 74
                             "description" => "People that speak spanish and are in San Francisco",
75 75
                             "name" => "Spanish speaking San Franciscans",
@@ -99,15 +99,15 @@  discard block
 block discarded – undo
99 99
                             "project_id" => 1000,
100 100
                             "archived" => false,
101 101
                             "conditions" => array(
102
-                              "and",
103
-                              array(
102
+                                "and",
103
+                                array(
104 104
                                 "type" => "language",
105 105
                                 "value" => "es"
106
-                              ),
107
-                              array(
106
+                                ),
107
+                                array(
108 108
                                 "type" => "location",
109 109
                                 "value" => "US-CA-SANFRANCISCO"
110
-                              )
110
+                                )
111 111
                             ),
112 112
                             "description" => "People that speak spanish and are in San Francisco",
113 113
                             "name" => "Spanish speaking San Franciscans",
@@ -123,15 +123,15 @@  discard block
 block discarded – undo
123 123
                 "project_id" => 1000,
124 124
                 "archived" => false,
125 125
                 "conditions" => array(
126
-                  "and",
127
-                  array(
126
+                    "and",
127
+                    array(
128 128
                     "type" => "language",
129 129
                     "value" => "es"
130
-                  ),
131
-                  array(
130
+                    ),
131
+                    array(
132 132
                     "type" => "location",
133 133
                     "value" => "US-CA-SANFRANCISCO"
134
-                  )
134
+                    )
135 135
                 ),
136 136
                 "description" => "People that speak spanish and are in San Francisco",
137 137
                 "name" => "Spanish speaking San Franciscans",
@@ -156,15 +156,15 @@  discard block
 block discarded – undo
156 156
                             "project_id" => 1000,
157 157
                             "archived" => false,
158 158
                             "conditions" => array(
159
-                              "and",
160
-                              array(
159
+                                "and",
160
+                                array(
161 161
                                 "type" => "language",
162 162
                                 "value" => "es"
163
-                              ),
164
-                              array(
163
+                                ),
164
+                                array(
165 165
                                 "type" => "location",
166 166
                                 "value" => "US-CA-SANFRANCISCO"
167
-                              )
167
+                                )
168 168
                             ),
169 169
                             "description" => "People that speak spanish and are in San Francisco",
170 170
                             "name" => "Spanish speaking San Franciscans",
@@ -180,15 +180,15 @@  discard block
 block discarded – undo
180 180
                 "project_id" => 1000,
181 181
                 "archived" => false,
182 182
                 "conditions" => array(
183
-                  "and",
184
-                  array(
183
+                    "and",
184
+                    array(
185 185
                     "type" => "language",
186 186
                     "value" => "es"
187
-                  ),
188
-                  array(
187
+                    ),
188
+                    array(
189 189
                     "type" => "location",
190 190
                     "value" => "US-CA-SANFRANCISCO"
191
-                  )
191
+                    )
192 192
                 ),
193 193
                 "description" => "People that speak spanish and are in San Francisco",
194 194
                 "name" => "Spanish speaking San Franciscans",
Please login to merge, or discard this patch.
tests/OptimizelyPHPTest/Service/v2/ExperimentsTest.php 1 patch
Indentation   +179 added lines, -179 removed lines patch added patch discarded remove patch
@@ -23,20 +23,20 @@  discard block
 block discarded – undo
23 23
                         array(
24 24
                             "project_id" => 1000,
25 25
                             "audience_ids" => array(
26
-                              1234,
27
-                              1212,
28
-                              1432
26
+                                1234,
27
+                                1212,
28
+                                1432
29 29
                             ),
30 30
                             "campaign_id" => 2000,
31 31
                             "changes" => array(
32
-                              array(
32
+                                array(
33 33
                                 "type" => "custom_code",
34 34
                                 "allow_additional_redirect" => true,
35 35
                                 "async" => true,
36 36
                                 "css_selector" => "a[href*=\"optimizely\"]",
37 37
                                 "dependencies" => array(
38
-                                  24,
39
-                                  26
38
+                                    24,
39
+                                    26
40 40
                                 ),
41 41
                                 "destination" => "https://app.optimizely.com/",
42 42
                                 "extension_id" => 1234,
@@ -44,37 +44,37 @@  discard block
 block discarded – undo
44 44
                                 "src" => 524,
45 45
                                 "value" => "window.someGlobalFunction();",
46 46
                                 "id" => "string"
47
-                              )
47
+                                )
48 48
                             ),
49 49
                             "description" => "string",
50 50
                             "holdback" => 5000,
51 51
                             "key" => "home_page_experiment",
52 52
                             "metrics" => array(
53
-                              array(
53
+                                array(
54 54
                                 "kind" => "string",
55 55
                                 "id" => 0
56
-                              )
56
+                                )
57 57
                             ),
58 58
                             "name" => "Blue Button Experiment",
59 59
                             "schedule" => array(
60
-                              "start_time" => "2016-10-17T07:05:00.070Z",
61
-                              "stop_time" => "2016-10-17T07:05:00.070Z",
62
-                              "time_zone" => "UTC"
60
+                                "start_time" => "2016-10-17T07:05:00.070Z",
61
+                                "stop_time" => "2016-10-17T07:05:00.070Z",
62
+                                "time_zone" => "UTC"
63 63
                             ),
64 64
                             "status" => "active",
65 65
                             "variations" => array(
66
-                              array(
66
+                                array(
67 67
                                 "actions" => array(
68
-                                  array(
68
+                                    array(
69 69
                                     "changes" => array(
70
-                                      array(
70
+                                        array(
71 71
                                         "type" => "custom_code",
72 72
                                         "allow_additional_redirect" => true, 
73 73
                                         "async" => true,
74 74
                                         "css_selector" => "a[href*=\"optimizely\"]",
75 75
                                         "dependencies" => array(
76
-                                          24,
77
-                                          26
76
+                                            24,
77
+                                            26
78 78
                                         ),
79 79
                                         "destination" => "https://app.optimizely.com/",
80 80
                                         "extension_id" => 1234,
@@ -82,23 +82,23 @@  discard block
 block discarded – undo
82 82
                                         "src" => 524,
83 83
                                         "value" => "window.someGlobalFunction();",
84 84
                                         "id" => "string"
85
-                                      )
85
+                                        )
86 86
                                     ),
87 87
                                     "page_id" => 0
88
-                                  )
88
+                                    )
89 89
                                 ),
90 90
                                 "archived"=> true,
91 91
                                 "key" => "blue_button_variation",
92 92
                                 "name" => "Blue Button",
93 93
                                 "variation_id" => 0,
94 94
                                 "weight" => 0
95
-                              )
95
+                                )
96 96
                             ),
97 97
                             "created" => "2016-10-17T07:05:00.070Z",
98 98
                             "id" => 3000,
99 99
                             "is_classic" => false,
100 100
                             "last_modified" => "2016-10-17T07:05:00.070Z"
101
-                          )
101
+                            )
102 102
                         )
103 103
                     );
104 104
         
@@ -122,20 +122,20 @@  discard block
 block discarded – undo
122 122
                     ->willReturn(array(
123 123
                             "project_id" => 1000,
124 124
                             "audience_ids" => array(
125
-                              1234,
126
-                              1212,
127
-                              1432
125
+                                1234,
126
+                                1212,
127
+                                1432
128 128
                             ),
129 129
                             "campaign_id" => 2000,
130 130
                             "changes" => array(
131
-                              array(
131
+                                array(
132 132
                                 "type" => "custom_code",
133 133
                                 "allow_additional_redirect" => true,
134 134
                                 "async" => true,
135 135
                                 "css_selector" => "a[href*=\"optimizely\"]",
136 136
                                 "dependencies" => array(
137
-                                  24,
138
-                                  26
137
+                                    24,
138
+                                    26
139 139
                                 ),
140 140
                                 "destination" => "https://app.optimizely.com/",
141 141
                                 "extension_id" => 1234,
@@ -143,37 +143,37 @@  discard block
 block discarded – undo
143 143
                                 "src" => 524,
144 144
                                 "value" => "window.someGlobalFunction();",
145 145
                                 "id" => "string"
146
-                              )
146
+                                )
147 147
                             ),
148 148
                             "description" => "string",
149 149
                             "holdback" => 5000,
150 150
                             "key" => "home_page_experiment",
151 151
                             "metrics" => array(
152
-                              array(
152
+                                array(
153 153
                                 "kind" => "string",
154 154
                                 "id" => 0
155
-                              )
155
+                                )
156 156
                             ),
157 157
                             "name" => "Blue Button Experiment",
158 158
                             "schedule" => array(
159
-                              "start_time" => "2016-10-17T07:05:00.070Z",
160
-                              "stop_time" => "2016-10-17T07:05:00.070Z",
161
-                              "time_zone" => "UTC"
159
+                                "start_time" => "2016-10-17T07:05:00.070Z",
160
+                                "stop_time" => "2016-10-17T07:05:00.070Z",
161
+                                "time_zone" => "UTC"
162 162
                             ),
163 163
                             "status" => "active",
164 164
                             "variations" => array(
165
-                              array(
165
+                                array(
166 166
                                 "actions" => array(
167
-                                  array(
167
+                                    array(
168 168
                                     "changes" => array(
169
-                                      array(
169
+                                        array(
170 170
                                         "type" => "custom_code",
171 171
                                         "allow_additional_redirect" => true, 
172 172
                                         "async" => true,
173 173
                                         "css_selector" => "a[href*=\"optimizely\"]",
174 174
                                         "dependencies" => array(
175
-                                          24,
176
-                                          26
175
+                                            24,
176
+                                            26
177 177
                                         ),
178 178
                                         "destination" => "https://app.optimizely.com/",
179 179
                                         "extension_id" => 1234,
@@ -181,23 +181,23 @@  discard block
 block discarded – undo
181 181
                                         "src" => 524,
182 182
                                         "value" => "window.someGlobalFunction();",
183 183
                                         "id" => "string"
184
-                                      )
184
+                                        )
185 185
                                     ),
186 186
                                     "page_id" => 0
187
-                                  )
187
+                                    )
188 188
                                 ),
189 189
                                 "archived"=> true,
190 190
                                 "key" => "blue_button_variation",
191 191
                                 "name" => "Blue Button",
192 192
                                 "variation_id" => 0,
193 193
                                 "weight" => 0
194
-                              )
194
+                                )
195 195
                             ),
196 196
                             "created" => "2016-10-17T07:05:00.070Z",
197 197
                             "id" => 3000,
198 198
                             "is_classic" => false,
199 199
                             "last_modified" => "2016-10-17T07:05:00.070Z"
200
-                          )
200
+                            )
201 201
                         );
202 202
         
203 203
         $experimentsService = new Experiments($optimizelyApiClientMock);
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
                             "end_time" => "2016-10-17T07:05:00.089Z",
222 222
                             "experiment_id" => 3000,
223 223
                             "metrics" => array(
224
-                              array(
224
+                                array(
225 225
                                 "event" => "string",
226 226
                                 "event_name" => "string",
227 227
                                 "measure" => "conversions",
@@ -229,54 +229,54 @@  discard block
 block discarded – undo
229 229
                                 "priority" => 1,
230 230
                                 "unit" => "session",
231 231
                                 "variation_results" => array(
232
-                                  "9000" => array(
232
+                                    "9000" => array(
233 233
                                     "experiment_id" => 0,
234 234
                                     "is_baseline" => true,
235 235
                                     "lift" => array(
236
-                                      "confidence_interval" => array(
236
+                                        "confidence_interval" => array(
237 237
                                         0.010399560300730457,
238 238
                                         0.0850821459929161
239
-                                      ),
240
-                                      "is_most_conclusive" => true,
241
-                                      "is_significant" => true,
242
-                                      "significance" => 0,
243
-                                      "value" => 0,
244
-                                      "visitors_remaining" => 0
239
+                                        ),
240
+                                        "is_most_conclusive" => true,
241
+                                        "is_significant" => true,
242
+                                        "significance" => 0,
243
+                                        "value" => 0,
244
+                                        "visitors_remaining" => 0
245 245
                                     ),
246 246
                                     "name" => "Blue Button",
247 247
                                     "rate" => 0,
248 248
                                     "scope" => "variation",
249 249
                                     "total_increase" => array(
250
-                                      "confidence_interval" => array(
250
+                                        "confidence_interval" => array(
251 251
                                         0.010399560300730457,
252 252
                                         0.0850821459929161
253
-                                      ),
254
-                                      "is_most_conclusive" => true,
255
-                                      "is_significant" => true,
256
-                                      "significance" => 0,
257
-                                      "value" => 0,
258
-                                      "visitors_remaining" => 0
253
+                                        ),
254
+                                        "is_most_conclusive" => true,
255
+                                        "is_significant" => true,
256
+                                        "significance" => 0,
257
+                                        "value" => 0,
258
+                                        "visitors_remaining" => 0
259 259
                                     ),
260 260
                                     "value" => 0,
261 261
                                     "variation_id" => "string"
262
-                                  )
262
+                                    )
263
+                                )
263 264
                                 )
264
-                              )
265 265
                             ),
266 266
                             "reach" => array(
267
-                              "baseline_count" => 0,
268
-                              "baseline_reach" => 0,
269
-                              "total_count" => 0,
270
-                              "treatment_count" => 0,
271
-                              "treatment_reach" => 0,
272
-                              "variations" => array(
267
+                                "baseline_count" => 0,
268
+                                "baseline_reach" => 0,
269
+                                "total_count" => 0,
270
+                                "treatment_count" => 0,
271
+                                "treatment_reach" => 0,
272
+                                "variations" => array(
273 273
                                 "9000" => array(
274
-                                  "count" => 0,
275
-                                  "name" => "Blue Button",
276
-                                  "variation_id" => "string",
277
-                                  "variation_reach" => 0
274
+                                    "count" => 0,
275
+                                    "name" => "Blue Button",
276
+                                    "variation_id" => "string",
277
+                                    "variation_reach" => 0
278
+                                )
278 279
                                 )
279
-                              )
280 280
                             ),
281 281
                             "start_time" => "2016-10-17T07:05:00.090Z"
282 282
                         ));
@@ -300,20 +300,20 @@  discard block
 block discarded – undo
300 300
                     ->willReturn(array(
301 301
                             "project_id" => 1000,
302 302
                             "audience_ids" => array(
303
-                              1234,
304
-                              1212,
305
-                              1432
303
+                                1234,
304
+                                1212,
305
+                                1432
306 306
                             ),
307 307
                             "campaign_id" => 2000,
308 308
                             "changes" => array(
309
-                              array(
309
+                                array(
310 310
                                 "type" => "custom_code",
311 311
                                 "allow_additional_redirect" => true,
312 312
                                 "async" => true,
313 313
                                 "css_selector" => "a[href*=\"optimizely\"]",
314 314
                                 "dependencies" => array(
315
-                                  24,
316
-                                  26
315
+                                    24,
316
+                                    26
317 317
                                 ),
318 318
                                 "destination" => "https://app.optimizely.com/",
319 319
                                 "extension_id" => 1234,
@@ -321,37 +321,37 @@  discard block
 block discarded – undo
321 321
                                 "src" => 524,
322 322
                                 "value" => "window.someGlobalFunction();",
323 323
                                 "id" => "string"
324
-                              )
324
+                                )
325 325
                             ),
326 326
                             "description" => "string",
327 327
                             "holdback" => 5000,
328 328
                             "key" => "home_page_experiment",
329 329
                             "metrics" => array(
330
-                              array(
330
+                                array(
331 331
                                 "kind" => "string",
332 332
                                 "id" => 0
333
-                              )
333
+                                )
334 334
                             ),
335 335
                             "name" => "Blue Button Experiment",
336 336
                             "schedule" => array(
337
-                              "start_time" => "2016-10-17T07:05:00.099Z",
338
-                              "stop_time" => "2016-10-17T07:05:00.099Z",
339
-                              "time_zone" => "UTC"
337
+                                "start_time" => "2016-10-17T07:05:00.099Z",
338
+                                "stop_time" => "2016-10-17T07:05:00.099Z",
339
+                                "time_zone" => "UTC"
340 340
                             ),
341 341
                             "status" => "active",
342 342
                             "variations" => array(
343
-                              array(
343
+                                array(
344 344
                                 "actions" => array(
345
-                                  array(
345
+                                    array(
346 346
                                     "changes" => array(
347
-                                      array(
347
+                                        array(
348 348
                                         "type" => "custom_code",
349 349
                                         "allow_additional_redirect" => true,
350 350
                                         "async" => true,
351 351
                                         "css_selector" => "a[href*=\"optimizely\"]",
352 352
                                         "dependencies" => array(
353
-                                          24,
354
-                                          26
353
+                                            24,
354
+                                            26
355 355
                                         ),
356 356
                                         "destination" => "https://app.optimizely.com/",
357 357
                                         "extension_id" => 1234,
@@ -359,17 +359,17 @@  discard block
 block discarded – undo
359 359
                                         "src" => 524,
360 360
                                         "value" => "window.someGlobalFunction();",
361 361
                                         "id" => "string"
362
-                                      )
362
+                                        )
363 363
                                     ),
364 364
                                     "page_id" => 0
365
-                                  )
365
+                                    )
366 366
                                 ),
367 367
                                 "archived" => true,
368 368
                                 "key" => "blue_button_variation",
369 369
                                 "name" => "Blue Button",
370 370
                                 "variation_id" => 0,
371 371
                                 "weight" => 0
372
-                              )
372
+                                )
373 373
                             ),
374 374
                             "created" => "2016-10-17T07:05:00.099Z",
375 375
                             "id" => 3000,
@@ -382,73 +382,73 @@  discard block
 block discarded – undo
382 382
         $experiment = new Experiment(array(
383 383
             "project_id" => 1000,
384 384
             "audience_ids" => array(
385
-              1234,
386
-              1212,
387
-              1432
385
+                1234,
386
+                1212,
387
+                1432
388 388
             ),
389 389
             "campaign_id" => 2000,
390 390
             "changes" => array(
391
-              array(
391
+                array(
392 392
                 "type" => "custom_code",
393 393
                 "allow_additional_redirect" => true,
394 394
                 "async" => true,
395 395
                 "css_selector" => "a[href*=\"optimizely\"]",
396 396
                 "dependencies" => array(
397
-                  24,
398
-                  26
397
+                    24,
398
+                    26
399 399
                 ),
400 400
                 "destination" => "https://app.optimizely.com/",
401 401
                 "extension_id" => 1234,
402 402
                 "preserve_parameters" => true,
403 403
                 "src" => 524,
404 404
                 "value" => "window.someGlobalFunction();"
405
-              )
405
+                )
406 406
             ),
407 407
             "description" => "string",
408 408
             "holdback" => 5000,
409 409
             "key" => "home_page_experiment",
410 410
             "metrics" => array(
411
-              array(
411
+                array(
412 412
                 "kind" => "string"
413
-              )
413
+                )
414 414
             ),
415 415
             "name" => "Blue Button Experiment",
416 416
             "schedule" => array(
417
-              "start_time" => "2016-10-17T07:04:59.724Z",
418
-              "stop_time" => "2016-10-17T07:04:59.724Z",
419
-              "time_zone" => "UTC"
417
+                "start_time" => "2016-10-17T07:04:59.724Z",
418
+                "stop_time" => "2016-10-17T07:04:59.724Z",
419
+                "time_zone" => "UTC"
420 420
             ),
421 421
             "status" => "active",
422 422
             "variations" => array(
423
-              array(
423
+                array(
424 424
                 "actions" => array(
425
-                  array(
425
+                    array(
426 426
                     "changes" => array(
427
-                      array(
427
+                        array(
428 428
                         "type" => "custom_code",
429 429
                         "allow_additional_redirect" => true,
430 430
                         "async" => true,
431 431
                         "css_selector" => "a[href*=\"optimizely\"]",
432 432
                         "dependencies" => array(
433
-                          24,
434
-                          26
433
+                            24,
434
+                            26
435 435
                         ),
436 436
                         "destination" => "https://app.optimizely.com/",
437 437
                         "extension_id" => 1234,
438 438
                         "preserve_parameters" => true,
439 439
                         "src" => 524,
440 440
                         "value" => "window.someGlobalFunction();"
441
-                      )
441
+                        )
442 442
                     ),
443 443
                     "page_id" => 0
444
-                  )
444
+                    )
445 445
                 ),
446 446
                 "archived" => true,
447 447
                 "key" => "blue_button_variation",
448 448
                 "name" => "Blue Button",
449 449
                 "variation_id" => 0,
450 450
                 "weight" => 0
451
-              )
451
+                )
452 452
             )
453 453
         ));
454 454
         
@@ -469,20 +469,20 @@  discard block
 block discarded – undo
469 469
                     ->willReturn(array(
470 470
                         "project_id" => 1000,
471 471
                         "audience_ids" => array(
472
-                          1234,
473
-                          1212,
474
-                          1432
472
+                            1234,
473
+                            1212,
474
+                            1432
475 475
                         ),
476 476
                         "campaign_id" => 2000,
477 477
                         "changes" => array(
478
-                          array(
478
+                            array(
479 479
                             "type" => "custom_code",
480 480
                             "allow_additional_redirect" => true,
481 481
                             "async" => true,
482 482
                             "css_selector" => "a[href*=\"optimizely\"]",
483 483
                             "dependencies" => array(
484
-                              24,
485
-                              26
484
+                                24,
485
+                                26
486 486
                             ),
487 487
                             "destination" => "https://app.optimizely.com/",
488 488
                             "extension_id" => 1234,
@@ -490,37 +490,37 @@  discard block
 block discarded – undo
490 490
                             "src" => 524,
491 491
                             "value" => "window.someGlobalFunction();",
492 492
                             "id" => "string"
493
-                          )
493
+                            )
494 494
                         ),
495 495
                         "description" => "string",
496 496
                         "holdback" => 5000,
497 497
                         "key" => "home_page_experiment",
498 498
                         "metrics" => array(
499
-                          array(
499
+                            array(
500 500
                             "kind" => "string",
501 501
                             "id" => 0
502
-                          )
502
+                            )
503 503
                         ),
504 504
                         "name" => "Blue Button Experiment",
505 505
                         "schedule" => array(
506
-                          "start_time" => "2016-10-17T07:05:00.109Z",
507
-                          "stop_time" => "2016-10-17T07:05:00.109Z",
508
-                          "time_zone" => "UTC"
506
+                            "start_time" => "2016-10-17T07:05:00.109Z",
507
+                            "stop_time" => "2016-10-17T07:05:00.109Z",
508
+                            "time_zone" => "UTC"
509 509
                         ),
510 510
                         "status" => "active",
511 511
                         "variations" => array(
512
-                          array(
512
+                            array(
513 513
                             "actions" => array(
514
-                              array(
514
+                                array(
515 515
                                 "changes" => array(
516
-                                  array(
516
+                                    array(
517 517
                                     "type" => "custom_code",
518 518
                                     "allow_additional_redirect" => true,
519 519
                                     "async" => true,
520 520
                                     "css_selector" => "a[href*=\"optimizely\"]",
521 521
                                     "dependencies" => array(
522
-                                      24,
523
-                                      26
522
+                                        24,
523
+                                        26
524 524
                                     ),
525 525
                                     "destination" => "https://app.optimizely.com/",
526 526
                                     "extension_id" => 1234,
@@ -528,17 +528,17 @@  discard block
 block discarded – undo
528 528
                                     "src" => 524,
529 529
                                     "value" => "window.someGlobalFunction();",
530 530
                                     "id" => "string"
531
-                                  )
531
+                                    )
532 532
                                 ),
533 533
                                 "page_id" => 0
534
-                              )
534
+                                )
535 535
                             ),
536 536
                             "archived" => true,
537 537
                             "key" => "blue_button_variation",
538 538
                             "name" => "Blue Button",
539 539
                             "variation_id" => 0,
540 540
                             "weight" => 0
541
-                          )
541
+                            )
542 542
                         ),
543 543
                         "created" => "2016-10-17T07:05:00.109Z",
544 544
                         "id" => 3000,
@@ -549,72 +549,72 @@  discard block
 block discarded – undo
549 549
         $experimentsService = new Experiments($optimizelyApiClientMock);
550 550
         
551 551
         $experiment = new Experiment(array(
552
-              "audience_ids" => array(
552
+                "audience_ids" => array(
553 553
                 0
554
-              ),
555
-              "changes" => array(
554
+                ),
555
+                "changes" => array(
556 556
                 array(
557
-                  "type" => "custom_code",
558
-                  "allow_additional_redirect" => true,
559
-                  "async" => true,
560
-                  "css_selector" => "a[href*=\"optimizely\"]",
561
-                  "dependencies" => array(
557
+                    "type" => "custom_code",
558
+                    "allow_additional_redirect" => true,
559
+                    "async" => true,
560
+                    "css_selector" => "a[href*=\"optimizely\"]",
561
+                    "dependencies" => array(
562 562
                     24,
563 563
                     26
564
-                  ),
565
-                  "destination" => "https://app.optimizely.com/",
566
-                  "extension_id" => 1234,
567
-                  "preserve_parameters" => true,
568
-                  "src" => 524,
569
-                  "value" => "window.someGlobalFunction();"
564
+                    ),
565
+                    "destination" => "https://app.optimizely.com/",
566
+                    "extension_id" => 1234,
567
+                    "preserve_parameters" => true,
568
+                    "src" => 524,
569
+                    "value" => "window.someGlobalFunction();"
570 570
                 )
571
-              ),
572
-              "description" => "AB Test to see if the Blue Button converts more visitors",
573
-              "holdback" => 0,
574
-              "key" => "home_page_experiment",
575
-              "metrics" => array(
571
+                ),
572
+                "description" => "AB Test to see if the Blue Button converts more visitors",
573
+                "holdback" => 0,
574
+                "key" => "home_page_experiment",
575
+                "metrics" => array(
576 576
                 array(
577
-                  "kind" => "string"
577
+                    "kind" => "string"
578 578
                 )
579
-              ),
580
-              "name" => "Blue Button Experiment",
581
-              "schedule" => array(
579
+                ),
580
+                "name" => "Blue Button Experiment",
581
+                "schedule" => array(
582 582
                 "start_time" => "2016-10-17T07:04:59.731Z",
583 583
                 "stop_time" => "2016-10-17T07:04:59.731Z",
584 584
                 "time_zone" => "UTC"
585
-              ),
586
-              "status" => "active",
587
-              "variations" => array(
585
+                ),
586
+                "status" => "active",
587
+                "variations" => array(
588 588
                 array(
589
-                  "actions" => array(
589
+                    "actions" => array(
590 590
                     array(
591
-                      "changes" => array(
591
+                        "changes" => array(
592 592
                         array(
593
-                          "type" => "custom_code",
594
-                          "allow_additional_redirect" => true,
595
-                          "async" => true,
596
-                          "css_selector" => "a[href*=\"optimizely\"]",
597
-                          "dependencies" => array(
593
+                            "type" => "custom_code",
594
+                            "allow_additional_redirect" => true,
595
+                            "async" => true,
596
+                            "css_selector" => "a[href*=\"optimizely\"]",
597
+                            "dependencies" => array(
598 598
                             24,
599 599
                             26
600
-                          ),
601
-                          "destination" => "https://app.optimizely.com/",
602
-                          "extension_id" => 1234,
603
-                          "preserve_parameters" => true,
604
-                          "src" => 524,
605
-                          "value" => "window.someGlobalFunction();"
600
+                            ),
601
+                            "destination" => "https://app.optimizely.com/",
602
+                            "extension_id" => 1234,
603
+                            "preserve_parameters" => true,
604
+                            "src" => 524,
605
+                            "value" => "window.someGlobalFunction();"
606 606
                         )
607
-                      ),
608
-                      "page_id" => 0
607
+                        ),
608
+                        "page_id" => 0
609 609
                     )
610
-                  ),
611
-                  "archived" => true,
612
-                  "key" => "blue_button_variation",
613
-                  "name" => "Blue Button",
614
-                  "variation_id" => 0,
615
-                  "weight" => 0
610
+                    ),
611
+                    "archived" => true,
612
+                    "key" => "blue_button_variation",
613
+                    "name" => "Blue Button",
614
+                    "variation_id" => 0,
615
+                    "weight" => 0
616
+                )
616 617
                 )
617
-              )
618 618
         ));
619 619
         
620 620
         $updatedExperiment = $experimentsService->update(1000, $experiment, true, true);
Please login to merge, or discard this patch.
tests/OptimizelyPHPTest/Service/v2/BaseServiceTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
         $credentials = file_get_contents(dirname(__FILE__) . '/../../../auth_credentials.json');
12 12
         if ($credentials===false) {
13 13
             $this->fail("Couldn't read OAuth credentials from auth_credentials.json. Make sure " .
14
-                 "the file exists (if not, copy from auth_credentials.json.dist).");
14
+                    "the file exists (if not, copy from auth_credentials.json.dist).");
15 15
         }
16 16
 
17 17
         $credentials = json_decode($credentials, true);
Please login to merge, or discard this patch.
tests/OptimizelyPHPTest/Service/v2/CampaignsTest.php 1 patch
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
                         )
64 64
                     );
65 65
         
@@ -83,14 +83,14 @@  discard block
 block discarded – undo
83 83
                     ->willReturn(array(
84 84
                             "project_id" => 1000,
85 85
                             "changes" => array(
86
-                              array(
86
+                                array(
87 87
                                 "type" => "custom_code",
88 88
                                 "allow_additional_redirect" => true,
89 89
                                 "async" => true,
90 90
                                 "css_selector" => "a[href*=\"optimizely\"]",
91 91
                                 "dependencies" => array(
92
-                                  24,
93
-                                  26
92
+                                    24,
93
+                                    26
94 94
                                 ),
95 95
                                 "destination" => "https://app.optimizely.com/",
96 96
                                 "extension_id" => 1234,
@@ -98,25 +98,25 @@  discard block
 block discarded – undo
98 98
                                 "src" => 524,
99 99
                                 "value" => "window.someGlobalFunction();",
100 100
                                 "id" => "string"
101
-                              )
101
+                                )
102 102
                             ),
103 103
                             "created" => "2016-10-18T03:27:04.139Z",
104 104
                             "earliest" => "2016-10-18T03:27:04.139Z",
105 105
                             "experiment_ids" => array(
106
-                              0
106
+                                0
107 107
                             ),
108 108
                             "holdback" => 0,
109 109
                             "last_modified" => "2016-10-18T03:27:04.139Z",
110 110
                             "latest" => "2016-10-18T03:27:04.139Z",
111 111
                             "metrics" => array(
112
-                              array(
112
+                                array(
113 113
                                 "kind" => "string",
114 114
                                 "id" => 0
115
-                              )
115
+                                )
116 116
                             ),
117 117
                             "name" => "Landing Page Optimization",
118 118
                             "page_ids" => array(
119
-                              0
119
+                                0
120 120
                             ),
121 121
                             "status" => "active",
122 122
                             "type" => "a/b",
@@ -144,47 +144,47 @@  discard block
 block discarded – undo
144 144
                             "confidence_threshold" => 0,
145 145
                             "end_time" => "2016-10-18T03:27:04.147Z",
146 146
                             "metrics" => array(
147
-                              array(
147
+                                array(
148 148
                                 "event" => "string",
149 149
                                 "event_name" => "string",
150 150
                                 "measure" => "conversions",
151 151
                                 "metric_id" => "string",
152 152
                                 "priority" => 0,
153 153
                                 "results" => array(
154
-                                  "campaign" => array(
154
+                                    "campaign" => array(
155 155
                                     "experiment_id" => 0,
156 156
                                     "is_baseline" => true,
157 157
                                     "lift" => array(
158
-                                      "confidence_interval" => array(
158
+                                        "confidence_interval" => array(
159 159
                                         0.010399560300730457,
160 160
                                         0.0850821459929161
161
-                                      ),
162
-                                      "is_most_conclusive" => true,
163
-                                      "is_significant" => true,
164
-                                      "significance" => 0,
165
-                                      "value" => 0,
166
-                                      "visitors_remaining" => 0
161
+                                        ),
162
+                                        "is_most_conclusive" => true,
163
+                                        "is_significant" => true,
164
+                                        "significance" => 0,
165
+                                        "value" => 0,
166
+                                        "visitors_remaining" => 0
167 167
                                     ),
168 168
                                     "name" => "Blue Button",
169 169
                                     "rate" => 0,
170 170
                                     "scope" => "variation",
171 171
                                     "total_increase" => array(
172
-                                      "confidence_interval" => array(
172
+                                        "confidence_interval" => array(
173 173
                                         0.010399560300730457,
174 174
                                         0.0850821459929161
175
-                                      ),
176
-                                      "is_most_conclusive" => true,
177
-                                      "is_significant" => true,
178
-                                      "significance" => 0,
179
-                                      "value" => 0,
180
-                                      "visitors_remaining" => 0
175
+                                        ),
176
+                                        "is_most_conclusive" => true,
177
+                                        "is_significant" => true,
178
+                                        "significance" => 0,
179
+                                        "value" => 0,
180
+                                        "visitors_remaining" => 0
181 181
                                     ),
182 182
                                     "value" => 0,
183 183
                                     "variation_id" => "string"
184
-                                  )
184
+                                    )
185 185
                                 ),
186 186
                                 "unit" => "session"
187
-                              )
187
+                                )
188 188
                             ),
189 189
                             "start_time" => "2016-10-18T03:27:04.148Z"
190 190
                         ));
@@ -209,14 +209,14 @@  discard block
 block discarded – undo
209 209
                     ->willReturn(array(
210 210
                             "project_id" => 1000,
211 211
                             "changes" => array(
212
-                              array(
212
+                                array(
213 213
                                 "type" => "custom_code",
214 214
                                 "allow_additional_redirect" => true, 
215 215
                                 "async" => true,
216 216
                                 "css_selector" => "a[href*=\"optimizely\"]",
217 217
                                 "dependencies" => array(
218
-                                  24,
219
-                                  26
218
+                                    24,
219
+                                    26
220 220
                                 ),
221 221
                                 "destination" => "https://app.optimizely.com/",
222 222
                                 "extension_id" => 1234,
@@ -224,25 +224,25 @@  discard block
 block discarded – undo
224 224
                                 "src" => 524,
225 225
                                 "value" => "window.someGlobalFunction();",
226 226
                                 "id" => "string"
227
-                              )
227
+                                )
228 228
                             ),
229 229
                             "created" => "2016-10-18T03:27:04.155Z",
230 230
                             "earliest" => "2016-10-18T03:27:04.155Z",
231 231
                             "experiment_ids" => array(
232
-                              0
232
+                                0
233 233
                             ),
234 234
                             "holdback" => 0,
235 235
                             "last_modified" => "2016-10-18T03:27:04.155Z",
236 236
                             "latest" => "2016-10-18T03:27:04.155Z",
237 237
                             "metrics" => array(
238
-                              array(
238
+                                array(
239 239
                                 "kind" => "string",
240 240
                                 "id" => 0
241
-                              )
241
+                                )
242 242
                             ),
243 243
                             "name" => "Landing Page Optimization",
244 244
                             "page_ids" => array(
245
-                              0
245
+                                0
246 246
                             ),
247 247
                             "status" => "active",
248 248
                             "type" => "a/b",
@@ -254,38 +254,38 @@  discard block
 block discarded – undo
254 254
         $campaign = new Campaign(array(
255 255
                 "project_id" => 1000,
256 256
                 "changes" => array(
257
-                  array(
257
+                    array(
258 258
                     "type" => "custom_code",
259 259
                     "allow_additional_redirect" => true,
260 260
                     "async" => true,
261 261
                     "css_selector" => "a[href*=\"optimizely\"]",
262 262
                     "dependencies" => array(
263
-                      24,
264
-                      26
263
+                        24,
264
+                        26
265 265
                     ),
266 266
                     "destination" => "https://app.optimizely.com/",
267 267
                     "extension_id" => 1234,
268 268
                     "preserve_parameters" => true,
269 269
                     "src" => 524,
270 270
                     "value" => "window.someGlobalFunction();"
271
-                  )
271
+                    )
272 272
                 ),
273 273
                 "created" => "2016-10-18T03:27:04.067Z",
274 274
                 "earliest" => "2016-10-18T03:27:04.067Z",
275 275
                 "experiment_ids" => array(
276
-                  0
276
+                    0
277 277
                 ),
278 278
                 "holdback" => 0,
279 279
                 "last_modified" => "2016-10-18T03:27:04.067Z",
280 280
                 "latest" => "2016-10-18T03:27:04.067Z",
281 281
                 "metrics" => array(
282
-                  array(
282
+                    array(
283 283
                     "kind" => "string"
284
-                  )
284
+                    )
285 285
                 ),
286 286
                 "name" => "Landing Page Optimization",
287 287
                 "page_ids" => array(
288
-                  0
288
+                    0
289 289
                 ),
290 290
                 "status" => "active",
291 291
                 "type" => "a/b"
@@ -308,14 +308,14 @@  discard block
 block discarded – undo
308 308
                     ->willReturn(array(
309 309
                             "project_id" => 1000,
310 310
                             "changes" => array(
311
-                              array(
311
+                                array(
312 312
                                 "type" => "custom_code",
313 313
                                 "allow_additional_redirect" => true, 
314 314
                                 "async" => true,
315 315
                                 "css_selector" => "a[href*=\"optimizely\"]",
316 316
                                 "dependencies" => array(
317
-                                  24,
318
-                                  26
317
+                                    24,
318
+                                    26
319 319
                                 ),
320 320
                                 "destination" => "https://app.optimizely.com/",
321 321
                                 "extension_id" => 1234,
@@ -323,25 +323,25 @@  discard block
 block discarded – undo
323 323
                                 "src" => 524,
324 324
                                 "value" => "window.someGlobalFunction();",
325 325
                                 "id" => "string"
326
-                              )
326
+                                )
327 327
                             ),
328 328
                             "created" => "2016-10-18T03:27:04.155Z",
329 329
                             "earliest" => "2016-10-18T03:27:04.155Z",
330 330
                             "experiment_ids" => array(
331
-                              0
331
+                                0
332 332
                             ),
333 333
                             "holdback" => 0,
334 334
                             "last_modified" => "2016-10-18T03:27:04.155Z",
335 335
                             "latest" => "2016-10-18T03:27:04.155Z",
336 336
                             "metrics" => array(
337
-                              array(
337
+                                array(
338 338
                                 "kind" => "string",
339 339
                                 "id" => 0
340
-                              )
340
+                                )
341 341
                             ),
342 342
                             "name" => "Landing Page Optimization",
343 343
                             "page_ids" => array(
344
-                              0
344
+                                0
345 345
                             ),
346 346
                             "status" => "active",
347 347
                             "type" => "a/b",
@@ -353,38 +353,38 @@  discard block
 block discarded – undo
353 353
         $campaign = new Campaign(array(
354 354
                 "project_id" => 1000,
355 355
                 "changes" => array(
356
-                  array(
356
+                    array(
357 357
                     "type" => "custom_code",
358 358
                     "allow_additional_redirect" => true,
359 359
                     "async" => true,
360 360
                     "css_selector" => "a[href*=\"optimizely\"]",
361 361
                     "dependencies" => array(
362
-                      24,
363
-                      26
362
+                        24,
363
+                        26
364 364
                     ),
365 365
                     "destination" => "https://app.optimizely.com/",
366 366
                     "extension_id" => 1234,
367 367
                     "preserve_parameters" => true,
368 368
                     "src" => 524,
369 369
                     "value" => "window.someGlobalFunction();"
370
-                  )
370
+                    )
371 371
                 ),
372 372
                 "created" => "2016-10-18T03:27:04.067Z",
373 373
                 "earliest" => "2016-10-18T03:27:04.067Z",
374 374
                 "experiment_ids" => array(
375
-                  0
375
+                    0
376 376
                 ),
377 377
                 "holdback" => 0,
378 378
                 "last_modified" => "2016-10-18T03:27:04.067Z",
379 379
                 "latest" => "2016-10-18T03:27:04.067Z",
380 380
                 "metrics" => array(
381
-                  array(
381
+                    array(
382 382
                     "kind" => "string"
383
-                  )
383
+                    )
384 384
                 ),
385 385
                 "name" => "Landing Page Optimization",
386 386
                 "page_ids" => array(
387
-                  0
387
+                    0
388 388
                 ),
389 389
                 "status" => "active",
390 390
                 "type" => "a/b"
Please login to merge, or discard this patch.
tests/OptimizelyPHPTest/Service/v2/ProjectsTest.php 1 patch
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -109,16 +109,16 @@  discard block
 block discarded – undo
109 109
                             "platform" => "web",
110 110
                             "status" => "active",
111 111
                             "web_snippet" => array(
112
-                              "enable_force_variation" => false,
113
-                              "exclude_disabled_experiments" => false,
114
-                              "exclude_names" => true,
115
-                              "include_jquery" => true,
116
-                              "ip_anonymization" => false,
117
-                              "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$",
118
-                              "library" => "jquery-1.11.3-trim",
119
-                              "project_javascript" => "alert(\"Active Experiment\")",
120
-                              "code_revision" => 0,
121
-                              "js_file_size" => 63495
112
+                                "enable_force_variation" => false,
113
+                                "exclude_disabled_experiments" => false,
114
+                                "exclude_names" => true,
115
+                                "include_jquery" => true,
116
+                                "ip_anonymization" => false,
117
+                                "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$",
118
+                                "library" => "jquery-1.11.3-trim",
119
+                                "project_javascript" => "alert(\"Active Experiment\")",
120
+                                "code_revision" => 0,
121
+                                "js_file_size" => 63495
122 122
                             ),
123 123
                             "created" => "2016-10-17T07:04:59.991Z",
124 124
                             "id" => 1000,
@@ -137,14 +137,14 @@  discard block
 block discarded – undo
137 137
             "platform" => "web",
138 138
             "status" => "active",
139 139
             "web_snippet" => array(
140
-              "enable_force_variation" => false,
141
-              "exclude_disabled_experiments" => false,
142
-              "exclude_names" => true,
143
-              "include_jquery" => true,
144
-              "ip_anonymization" => false,
145
-              "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$",
146
-              "library" => "jquery-1.11.3-trim",
147
-              "project_javascript" => "alert(\"Active Experiment\")"
140
+                "enable_force_variation" => false,
141
+                "exclude_disabled_experiments" => false,
142
+                "exclude_names" => true,
143
+                "include_jquery" => true,
144
+                "ip_anonymization" => false,
145
+                "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$",
146
+                "library" => "jquery-1.11.3-trim",
147
+                "project_javascript" => "alert(\"Active Experiment\")"
148 148
             )
149 149
         ));
150 150
         
@@ -173,16 +173,16 @@  discard block
 block discarded – undo
173 173
                             "platform" => "web",
174 174
                             "status" => "active",
175 175
                             "web_snippet" => array(
176
-                              "enable_force_variation" => false,
177
-                              "exclude_disabled_experiments" => false,
178
-                              "exclude_names" => true,
179
-                              "include_jquery" => true,
180
-                              "ip_anonymization" => false,
181
-                              "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$",
182
-                              "library" => "jquery-1.11.3-trim",
183
-                              "project_javascript" => "alert(\"Active Experiment\")",
184
-                              "code_revision" => 0,
185
-                              "js_file_size" => 63495
176
+                                "enable_force_variation" => false,
177
+                                "exclude_disabled_experiments" => false,
178
+                                "exclude_names" => true,
179
+                                "include_jquery" => true,
180
+                                "ip_anonymization" => false,
181
+                                "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$",
182
+                                "library" => "jquery-1.11.3-trim",
183
+                                "project_javascript" => "alert(\"Active Experiment\")",
184
+                                "code_revision" => 0,
185
+                                "js_file_size" => 63495
186 186
                             ),
187 187
                             "created" => "2016-10-17T07:04:59.999Z",
188 188
                             "id" => 1000,
@@ -199,14 +199,14 @@  discard block
 block discarded – undo
199 199
             "name" => "Test Project",
200 200
             "status" => "active",
201 201
             "web_snippet" => array(
202
-              "enable_force_variation" => false,
203
-              "exclude_disabled_experiments" => false,
204
-              "exclude_names" => true,
205
-              "include_jquery" => true,
206
-              "ip_anonymization" => false,
207
-              "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$",
208
-              "library" => "jquery-1.11.3-trim",
209
-              "project_javascript" => "alert(\"Active Experiment\")"
202
+                "enable_force_variation" => false,
203
+                "exclude_disabled_experiments" => false,
204
+                "exclude_names" => true,
205
+                "include_jquery" => true,
206
+                "ip_anonymization" => false,
207
+                "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$",
208
+                "library" => "jquery-1.11.3-trim",
209
+                "project_javascript" => "alert(\"Active Experiment\")"
210 210
             )
211 211
         ));
212 212
         
@@ -236,14 +236,14 @@  discard block
 block discarded – undo
236 236
             "platform" => "web",
237 237
             "status" => "active",
238 238
             "web_snippet" => array(
239
-              "enable_force_variation" => false,
240
-              "exclude_disabled_experiments" => false,
241
-              "exclude_names" => true,
242
-              "include_jquery" => true,
243
-              "ip_anonymization" => false,
244
-              "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$",
245
-              "library" => "jquery-1.11.3-trim",
246
-              "project_javascript" => "alert(\"Active Experiment\")"
239
+                "enable_force_variation" => false,
240
+                "exclude_disabled_experiments" => false,
241
+                "exclude_names" => true,
242
+                "include_jquery" => true,
243
+                "ip_anonymization" => false,
244
+                "ip_filter" => "^206\\.23\\.100\\.([5-9][0-9]|1([0-4][0-9]|50))$",
245
+                "library" => "jquery-1.11.3-trim",
246
+                "project_javascript" => "alert(\"Active Experiment\")"
247 247
             )
248 248
         ));
249 249
         
Please login to merge, or discard this patch.
tests/OptimizelyPHPTest/Resource/v2/CampaignResultsTest.php 1 patch
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -13,47 +13,47 @@  discard block
 block discarded – undo
13 13
             "confidence_threshold" => 0,
14 14
             "end_time" => "2016-10-14T05:08:42.966Z",
15 15
             "metrics" => array(
16
-              array(
16
+                array(
17 17
                 "event" => "string",
18 18
                 "event_name" => "string",
19 19
                 "measure" => "conversions",
20 20
                 "metric_id" => "string",
21 21
                 "priority" => 0,
22 22
                 "results" => array(
23
-                  "campaign" => array(
23
+                    "campaign" => array(
24 24
                     "experiment_id" => 0,
25 25
                     "is_baseline" => true,
26 26
                     "lift" => array(
27
-                      "confidence_interval" => array(
27
+                        "confidence_interval" => array(
28 28
                         0.010399560300730457,
29 29
                         0.0850821459929161
30
-                      ),
31
-                      "is_most_conclusive" => true,
32
-                      "is_significant" => true,
33
-                      "significance" => 0,
34
-                      "value" => 0,
35
-                      "visitors_remaining" => 0
30
+                        ),
31
+                        "is_most_conclusive" => true,
32
+                        "is_significant" => true,
33
+                        "significance" => 0,
34
+                        "value" => 0,
35
+                        "visitors_remaining" => 0
36 36
                     ),
37 37
                     "name" => "Blue Button",
38 38
                     "rate" => 0,
39 39
                     "scope" => "variation",
40 40
                     "total_increase" => array(
41
-                      "confidence_interval" => array(
41
+                        "confidence_interval" => array(
42 42
                         0.010399560300730457,
43 43
                         0.0850821459929161
44
-                      ),
45
-                      "is_most_conclusive" => true,
46
-                      "is_significant" => true,
47
-                      "significance" => 0,
48
-                      "value" => 0,
49
-                      "visitors_remaining" => 0
44
+                        ),
45
+                        "is_most_conclusive" => true,
46
+                        "is_significant" => true,
47
+                        "significance" => 0,
48
+                        "value" => 0,
49
+                        "visitors_remaining" => 0
50 50
                     ),
51 51
                     "value" => 0,
52 52
                     "variation_id" => "string"
53
-                  )
53
+                    )
54 54
                 ),
55 55
                 "unit" => "session"
56
-              )
56
+                )
57 57
             ),
58 58
             "start_time" => "2016-10-14T05:08:42.967Z"
59 59
         );
@@ -71,47 +71,47 @@  discard block
 block discarded – undo
71 71
             "confidence_threshold" => 0,
72 72
             "end_time" => "2016-10-14T05:08:42.966Z",
73 73
             "metrics" => array(
74
-              array(
74
+                array(
75 75
                 "event" => "string",
76 76
                 "event_name" => "string",
77 77
                 "measure" => "conversions",
78 78
                 "metric_id" => "string",
79 79
                 "priority" => 0,
80 80
                 "results" => array(
81
-                  "campaign" => array(
81
+                    "campaign" => array(
82 82
                     "experiment_id" => 0,
83 83
                     "is_baseline" => true,
84 84
                     "lift" => array(
85
-                      "confidence_interval" => array(
85
+                        "confidence_interval" => array(
86 86
                         0.010399560300730457,
87 87
                         0.0850821459929161
88
-                      ),
89
-                      "is_most_conclusive" => true,
90
-                      "is_significant" => true,
91
-                      "significance" => 0,
92
-                      "value" => 0,
93
-                      "visitors_remaining" => 0
88
+                        ),
89
+                        "is_most_conclusive" => true,
90
+                        "is_significant" => true,
91
+                        "significance" => 0,
92
+                        "value" => 0,
93
+                        "visitors_remaining" => 0
94 94
                     ),
95 95
                     "name" => "Blue Button",
96 96
                     "rate" => 0,
97 97
                     "scope" => "variation",
98 98
                     "total_increase" => array(
99
-                      "confidence_interval" => array(
99
+                        "confidence_interval" => array(
100 100
                         0.010399560300730457,
101 101
                         0.0850821459929161
102
-                      ),
103
-                      "is_most_conclusive" => true,
104
-                      "is_significant" => true,
105
-                      "significance" => 0,
106
-                      "value" => 0,
107
-                      "visitors_remaining" => 0
102
+                        ),
103
+                        "is_most_conclusive" => true,
104
+                        "is_significant" => true,
105
+                        "significance" => 0,
106
+                        "value" => 0,
107
+                        "visitors_remaining" => 0
108 108
                     ),
109 109
                     "value" => 0,
110 110
                     "variation_id" => "string"
111
-                  )
111
+                    )
112 112
                 ),
113 113
                 "unit" => "session"
114
-              )
114
+                )
115 115
             ),
116 116
             "start_time" => "2016-10-14T05:08:42.967Z"
117 117
         );
Please login to merge, or discard this patch.