@@ -92,73 +92,73 @@ discard block |
||
92 | 92 | $options = array( |
93 | 93 | "project_id" => 1000, |
94 | 94 | "audience_ids" => array( |
95 | - 1234, |
|
96 | - 1212, |
|
97 | - 1432 |
|
95 | + 1234, |
|
96 | + 1212, |
|
97 | + 1432 |
|
98 | 98 | ), |
99 | 99 | "campaign_id" => 2000, |
100 | 100 | "changes" => array( |
101 | - array( |
|
101 | + array( |
|
102 | 102 | "type" => "custom_code", |
103 | 103 | "allow_additional_redirect" => true, |
104 | 104 | "async" => true, |
105 | 105 | "css_selector" => "a[href*=\"optimizely\"]", |
106 | 106 | "dependencies" => array( |
107 | - 24, |
|
108 | - 26 |
|
107 | + 24, |
|
108 | + 26 |
|
109 | 109 | ), |
110 | 110 | "destination" => "https://app.optimizely.com/", |
111 | 111 | "extension_id" => 1234, |
112 | 112 | "preserve_parameters" => true, |
113 | 113 | "src" => 524, |
114 | 114 | "value" => "window.someGlobalFunction();" |
115 | - ) |
|
115 | + ) |
|
116 | 116 | ), |
117 | 117 | "description" => "string", |
118 | 118 | "holdback" => 5000, |
119 | 119 | "key" => "home_page_experiment", |
120 | 120 | "metrics" => array( |
121 | - array( |
|
121 | + array( |
|
122 | 122 | "kind" => "string" |
123 | - ) |
|
123 | + ) |
|
124 | 124 | ), |
125 | 125 | "name" => "Blue Button Experiment", |
126 | 126 | "schedule" => array( |
127 | - "start_time" => "2016-10-14T05:08:42.850Z", |
|
128 | - "stop_time" => "2016-10-14T05:08:42.850Z", |
|
129 | - "time_zone" => "UTC" |
|
127 | + "start_time" => "2016-10-14T05:08:42.850Z", |
|
128 | + "stop_time" => "2016-10-14T05:08:42.850Z", |
|
129 | + "time_zone" => "UTC" |
|
130 | 130 | ), |
131 | 131 | "status" => "active", |
132 | 132 | "variations" => array( |
133 | - array( |
|
133 | + array( |
|
134 | 134 | "actions" => array( |
135 | - array( |
|
135 | + array( |
|
136 | 136 | "changes" => array( |
137 | - array( |
|
137 | + array( |
|
138 | 138 | "type" => "custom_code", |
139 | 139 | "allow_additional_redirect" => true, |
140 | 140 | "async" => true, |
141 | 141 | "css_selector" => "a[href*=\"optimizely\"]", |
142 | 142 | "dependencies" => array( |
143 | - 24, |
|
144 | - 26 |
|
143 | + 24, |
|
144 | + 26 |
|
145 | 145 | ), |
146 | 146 | "destination" => "https://app.optimizely.com/", |
147 | 147 | "extension_id" => 1234, |
148 | 148 | "preserve_parameters" => true, |
149 | 149 | "src" => 524, |
150 | 150 | "value" => "window.someGlobalFunction();" |
151 | - ) |
|
151 | + ) |
|
152 | 152 | ), |
153 | 153 | "page_id" => 0 |
154 | - ) |
|
154 | + ) |
|
155 | 155 | ), |
156 | 156 | "archived" => true, |
157 | 157 | "key" => "blue_button_variation", |
158 | 158 | "name" => "Blue Button", |
159 | 159 | "variation_id" => 0, |
160 | 160 | "weight" => 0 |
161 | - ) |
|
161 | + ) |
|
162 | 162 | ) |
163 | 163 | ); |
164 | 164 | |
@@ -173,73 +173,73 @@ discard block |
||
173 | 173 | $options = array( |
174 | 174 | "project_id" => 1000, |
175 | 175 | "audience_ids" => array( |
176 | - 1234, |
|
177 | - 1212, |
|
178 | - 1432 |
|
176 | + 1234, |
|
177 | + 1212, |
|
178 | + 1432 |
|
179 | 179 | ), |
180 | 180 | "campaign_id" => 2000, |
181 | 181 | "changes" => array( |
182 | - array( |
|
182 | + array( |
|
183 | 183 | "type" => "custom_code", |
184 | 184 | "allow_additional_redirect" => true, |
185 | 185 | "async" => true, |
186 | 186 | "css_selector" => "a[href*=\"optimizely\"]", |
187 | 187 | "dependencies" => array( |
188 | - 24, |
|
189 | - 26 |
|
188 | + 24, |
|
189 | + 26 |
|
190 | 190 | ), |
191 | 191 | "destination" => "https://app.optimizely.com/", |
192 | 192 | "extension_id" => 1234, |
193 | 193 | "preserve_parameters" => true, |
194 | 194 | "src" => 524, |
195 | 195 | "value" => "window.someGlobalFunction();" |
196 | - ) |
|
196 | + ) |
|
197 | 197 | ), |
198 | 198 | "description" => "string", |
199 | 199 | "holdback" => 5000, |
200 | 200 | "key" => "home_page_experiment", |
201 | 201 | "metrics" => array( |
202 | - array( |
|
202 | + array( |
|
203 | 203 | "kind" => "string" |
204 | - ) |
|
204 | + ) |
|
205 | 205 | ), |
206 | 206 | "name" => "Blue Button Experiment", |
207 | 207 | "schedule" => array( |
208 | - "start_time" => "2016-10-14T05:08:42.850Z", |
|
209 | - "stop_time" => "2016-10-14T05:08:42.850Z", |
|
210 | - "time_zone" => "UTC" |
|
208 | + "start_time" => "2016-10-14T05:08:42.850Z", |
|
209 | + "stop_time" => "2016-10-14T05:08:42.850Z", |
|
210 | + "time_zone" => "UTC" |
|
211 | 211 | ), |
212 | 212 | "status" => "active", |
213 | 213 | "variations" => array( |
214 | - array( |
|
214 | + array( |
|
215 | 215 | "actions" => array( |
216 | - array( |
|
216 | + array( |
|
217 | 217 | "changes" => array( |
218 | - array( |
|
218 | + array( |
|
219 | 219 | "type" => "custom_code", |
220 | 220 | "allow_additional_redirect" => true, |
221 | 221 | "async" => true, |
222 | 222 | "css_selector" => "a[href*=\"optimizely\"]", |
223 | 223 | "dependencies" => array( |
224 | - 24, |
|
225 | - 26 |
|
224 | + 24, |
|
225 | + 26 |
|
226 | 226 | ), |
227 | 227 | "destination" => "https://app.optimizely.com/", |
228 | 228 | "extension_id" => 1234, |
229 | 229 | "preserve_parameters" => true, |
230 | 230 | "src" => 524, |
231 | 231 | "value" => "window.someGlobalFunction();" |
232 | - ) |
|
232 | + ) |
|
233 | 233 | ), |
234 | 234 | "page_id" => 0 |
235 | - ) |
|
235 | + ) |
|
236 | 236 | ), |
237 | 237 | "archived" => true, |
238 | 238 | "key" => "blue_button_variation", |
239 | 239 | "name" => "Blue Button", |
240 | 240 | "variation_id" => 0, |
241 | 241 | "weight" => 0 |
242 | - ) |
|
242 | + ) |
|
243 | 243 | ) |
244 | 244 | ); |
245 | 245 |
@@ -43,8 +43,8 @@ discard block |
||
43 | 43 | "category" => "add_to_cart", |
44 | 44 | "description" => "Item added to cart", |
45 | 45 | "event_filter" => array( |
46 | - "filter_type" => "target_selector", |
|
47 | - "selector" => ".menu-options" |
|
46 | + "filter_type" => "target_selector", |
|
47 | + "selector" => ".menu-options" |
|
48 | 48 | ), |
49 | 49 | "event_type" => "custom", |
50 | 50 | "key" => "add_to_cart", |
@@ -73,8 +73,8 @@ discard block |
||
73 | 73 | "category" => "add_to_cart", |
74 | 74 | "description" => "Item added to cart", |
75 | 75 | "event_filter" => array( |
76 | - "filter_type" => "target_selector", |
|
77 | - "selector" => ".menu-options" |
|
76 | + "filter_type" => "target_selector", |
|
77 | + "selector" => ".menu-options" |
|
78 | 78 | ), |
79 | 79 | "event_type" => "custom", |
80 | 80 | "key" => "add_to_cart", |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | case 'kind': $this->setKind($value); break; |
34 | 34 | case 'id': $this->setId($value); break; |
35 | 35 | default: |
36 | - throw new \Exception('Unknown option: ' . $name); |
|
36 | + throw new \Exception('Unknown option: '.$name); |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | // Remove options with empty values |
52 | 52 | $cleanedOptions = array(); |
53 | 53 | foreach ($options as $name=>$value) { |
54 | - if ($value!==null) |
|
54 | + if ($value !== null) |
|
55 | 55 | $cleanedOptions[$name] = $value; |
56 | 56 | } |
57 | 57 |
@@ -51,8 +51,9 @@ |
||
51 | 51 | // Remove options with empty values |
52 | 52 | $cleanedOptions = array(); |
53 | 53 | foreach ($options as $name=>$value) { |
54 | - if ($value!==null) |
|
55 | - $cleanedOptions[$name] = $value; |
|
54 | + if ($value!==null) { |
|
55 | + $cleanedOptions[$name] = $value; |
|
56 | + } |
|
56 | 57 | } |
57 | 58 | |
58 | 59 | return $cleanedOptions; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | case 'kind': $this->setKind($value); break; |
34 | 34 | case 'id': $this->setId($value); break; |
35 | 35 | default: |
36 | - throw new \Exception('Unknown option: ' . $name); |
|
36 | + throw new \Exception('Unknown option: '.$name); |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | // Remove options with empty values |
52 | 52 | $cleanedOptions = array(); |
53 | 53 | foreach ($options as $name=>$value) { |
54 | - if ($value!==null) |
|
54 | + if ($value !== null) |
|
55 | 55 | $cleanedOptions[$name] = $value; |
56 | 56 | } |
57 | 57 |
@@ -51,8 +51,9 @@ |
||
51 | 51 | // Remove options with empty values |
52 | 52 | $cleanedOptions = array(); |
53 | 53 | foreach ($options as $name=>$value) { |
54 | - if ($value!==null) |
|
55 | - $cleanedOptions[$name] = $value; |
|
54 | + if ($value!==null) { |
|
55 | + $cleanedOptions[$name] = $value; |
|
56 | + } |
|
56 | 57 | } |
57 | 58 | |
58 | 59 | return $cleanedOptions; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | case 'kind': $this->setKind($value); break; |
34 | 34 | case 'id': $this->setId($value); break; |
35 | 35 | default: |
36 | - throw new \Exception('Unknown option: ' . $name); |
|
36 | + throw new \Exception('Unknown option: '.$name); |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | // Remove options with empty values |
52 | 52 | $cleanedOptions = array(); |
53 | 53 | foreach ($options as $name=>$value) { |
54 | - if ($value!==null) |
|
54 | + if ($value !== null) |
|
55 | 55 | $cleanedOptions[$name] = $value; |
56 | 56 | } |
57 | 57 |
@@ -51,8 +51,9 @@ |
||
51 | 51 | // Remove options with empty values |
52 | 52 | $cleanedOptions = array(); |
53 | 53 | foreach ($options as $name=>$value) { |
54 | - if ($value!==null) |
|
55 | - $cleanedOptions[$name] = $value; |
|
54 | + if ($value!==null) { |
|
55 | + $cleanedOptions[$name] = $value; |
|
56 | + } |
|
56 | 57 | } |
57 | 58 | |
58 | 59 | return $cleanedOptions; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | case 'kind': $this->setKind($value); break; |
34 | 34 | case 'id': $this->setId($value); break; |
35 | 35 | default: |
36 | - throw new \Exception('Unknown option: ' . $name); |
|
36 | + throw new \Exception('Unknown option: '.$name); |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | // Remove options with empty values |
52 | 52 | $cleanedOptions = array(); |
53 | 53 | foreach ($options as $name=>$value) { |
54 | - if ($value!==null) |
|
54 | + if ($value !== null) |
|
55 | 55 | $cleanedOptions[$name] = $value; |
56 | 56 | } |
57 | 57 |
@@ -51,8 +51,9 @@ |
||
51 | 51 | // Remove options with empty values |
52 | 52 | $cleanedOptions = array(); |
53 | 53 | foreach ($options as $name=>$value) { |
54 | - if ($value!==null) |
|
55 | - $cleanedOptions[$name] = $value; |
|
54 | + if ($value!==null) { |
|
55 | + $cleanedOptions[$name] = $value; |
|
56 | + } |
|
56 | 57 | } |
57 | 58 | |
58 | 59 | return $cleanedOptions; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | case 'kind': $this->setKind($value); break; |
34 | 34 | case 'id': $this->setId($value); break; |
35 | 35 | default: |
36 | - throw new \Exception('Unknown option: ' . $name); |
|
36 | + throw new \Exception('Unknown option: '.$name); |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | // Remove options with empty values |
52 | 52 | $cleanedOptions = array(); |
53 | 53 | foreach ($options as $name=>$value) { |
54 | - if ($value!==null) |
|
54 | + if ($value !== null) |
|
55 | 55 | $cleanedOptions[$name] = $value; |
56 | 56 | } |
57 | 57 |
@@ -51,8 +51,9 @@ |
||
51 | 51 | // Remove options with empty values |
52 | 52 | $cleanedOptions = array(); |
53 | 53 | foreach ($options as $name=>$value) { |
54 | - if ($value!==null) |
|
55 | - $cleanedOptions[$name] = $value; |
|
54 | + if ($value!==null) { |
|
55 | + $cleanedOptions[$name] = $value; |
|
56 | + } |
|
56 | 57 | } |
57 | 58 | |
58 | 59 | return $cleanedOptions; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | case 'kind': $this->setKind($value); break; |
34 | 34 | case 'id': $this->setId($value); break; |
35 | 35 | default: |
36 | - throw new \Exception('Unknown option: ' . $name); |
|
36 | + throw new \Exception('Unknown option: '.$name); |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | // Remove options with empty values |
52 | 52 | $cleanedOptions = array(); |
53 | 53 | foreach ($options as $name=>$value) { |
54 | - if ($value!==null) |
|
54 | + if ($value !== null) |
|
55 | 55 | $cleanedOptions[$name] = $value; |
56 | 56 | } |
57 | 57 |
@@ -51,8 +51,9 @@ |
||
51 | 51 | // Remove options with empty values |
52 | 52 | $cleanedOptions = array(); |
53 | 53 | foreach ($options as $name=>$value) { |
54 | - if ($value!==null) |
|
55 | - $cleanedOptions[$name] = $value; |
|
54 | + if ($value!==null) { |
|
55 | + $cleanedOptions[$name] = $value; |
|
56 | + } |
|
56 | 57 | } |
57 | 58 | |
58 | 59 | return $cleanedOptions; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | case 'kind': $this->setKind($value); break; |
34 | 34 | case 'id': $this->setId($value); break; |
35 | 35 | default: |
36 | - throw new \Exception('Unknown option: ' . $name); |
|
36 | + throw new \Exception('Unknown option: '.$name); |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | // Remove options with empty values |
52 | 52 | $cleanedOptions = array(); |
53 | 53 | foreach ($options as $name=>$value) { |
54 | - if ($value!==null) |
|
54 | + if ($value !== null) |
|
55 | 55 | $cleanedOptions[$name] = $value; |
56 | 56 | } |
57 | 57 |
@@ -51,8 +51,9 @@ |
||
51 | 51 | // Remove options with empty values |
52 | 52 | $cleanedOptions = array(); |
53 | 53 | foreach ($options as $name=>$value) { |
54 | - if ($value!==null) |
|
55 | - $cleanedOptions[$name] = $value; |
|
54 | + if ($value!==null) { |
|
55 | + $cleanedOptions[$name] = $value; |
|
56 | + } |
|
56 | 57 | } |
57 | 58 | |
58 | 59 | return $cleanedOptions; |