@@ -91,8 +91,9 @@ |
||
91 | 91 | // Remove options with empty values |
92 | 92 | $cleanedOptions = array(); |
93 | 93 | foreach ($options as $name=>$value) { |
94 | - if ($value!==null) |
|
95 | - $cleanedOptions[$name] = $value; |
|
94 | + if ($value!==null) { |
|
95 | + $cleanedOptions[$name] = $value; |
|
96 | + } |
|
96 | 97 | } |
97 | 98 | |
98 | 99 | return $cleanedOptions; |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | } |
89 | 89 | case 'unit': $this->setUnit($value); break; |
90 | 90 | default: |
91 | - throw new Exception('Unknown option found in CampaignMetricResults entity: ' . $name); |
|
91 | + throw new Exception('Unknown option found in CampaignMetricResults entity: '.$name); |
|
92 | 92 | } |
93 | 93 | } |
94 | 94 | } |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | // Remove options with empty values |
116 | 116 | $cleanedOptions = array(); |
117 | 117 | foreach ($options as $name=>$value) { |
118 | - if ($value!==null) |
|
118 | + if ($value !== null) |
|
119 | 119 | $cleanedOptions[$name] = $value; |
120 | 120 | } |
121 | 121 |
@@ -91,8 +91,9 @@ |
||
91 | 91 | // Remove options with empty values |
92 | 92 | $cleanedOptions = array(); |
93 | 93 | foreach ($options as $name=>$value) { |
94 | - if ($value!==null) |
|
95 | - $cleanedOptions[$name] = $value; |
|
94 | + if ($value!==null) { |
|
95 | + $cleanedOptions[$name] = $value; |
|
96 | + } |
|
96 | 97 | } |
97 | 98 | |
98 | 99 | return $cleanedOptions; |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | case 'stop_time': $this->setStopTime($value); break; |
43 | 43 | case 'time_zone': $this->setTimezone($value); break; |
44 | 44 | default: |
45 | - throw new Exception('Unknown option found in the Schedule entity: ' . $name); |
|
45 | + throw new Exception('Unknown option found in the Schedule entity: '.$name); |
|
46 | 46 | } |
47 | 47 | } |
48 | 48 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | // Remove options with empty values |
62 | 62 | $cleanedOptions = array(); |
63 | 63 | foreach ($options as $name=>$value) { |
64 | - if ($value!==null) |
|
64 | + if ($value !== null) |
|
65 | 65 | $cleanedOptions[$name] = $value; |
66 | 66 | } |
67 | 67 |
@@ -91,8 +91,9 @@ |
||
91 | 91 | // Remove options with empty values |
92 | 92 | $cleanedOptions = array(); |
93 | 93 | foreach ($options as $name=>$value) { |
94 | - if ($value!==null) |
|
95 | - $cleanedOptions[$name] = $value; |
|
94 | + if ($value!==null) { |
|
95 | + $cleanedOptions[$name] = $value; |
|
96 | + } |
|
96 | 97 | } |
97 | 98 | |
98 | 99 | return $cleanedOptions; |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | case 'variation_id': $this->setVariationId($value); break; |
50 | 50 | case 'variation_reach': $this->setVariationReach($value); break; |
51 | 51 | default: |
52 | - throw new Exception('Unknown option found in VariationReach entity: ' . $name); |
|
52 | + throw new Exception('Unknown option found in VariationReach entity: '.$name); |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | // Remove options with empty values |
70 | 70 | $cleanedOptions = array(); |
71 | 71 | foreach ($options as $name=>$value) { |
72 | - if ($value!==null) |
|
72 | + if ($value !== null) |
|
73 | 73 | $cleanedOptions[$name] = $value; |
74 | 74 | } |
75 | 75 |
@@ -91,8 +91,9 @@ |
||
91 | 91 | // Remove options with empty values |
92 | 92 | $cleanedOptions = array(); |
93 | 93 | foreach ($options as $name=>$value) { |
94 | - if ($value!==null) |
|
95 | - $cleanedOptions[$name] = $value; |
|
94 | + if ($value!==null) { |
|
95 | + $cleanedOptions[$name] = $value; |
|
96 | + } |
|
96 | 97 | } |
97 | 98 | |
98 | 99 | return $cleanedOptions; |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | case 'filter_type': $this->setFilterType($value); break; |
36 | 36 | case 'selector': $this->setSelector($value); break; |
37 | 37 | default: |
38 | - throw new Exception('Unknown option found in the EventFilter entity: ' . $name); |
|
38 | + throw new Exception('Unknown option found in the EventFilter entity: '.$name); |
|
39 | 39 | } |
40 | 40 | } |
41 | 41 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | // Remove options with empty values |
54 | 54 | $cleanedOptions = array(); |
55 | 55 | foreach ($options as $name=>$value) { |
56 | - if ($value!==null) |
|
56 | + if ($value !== null) |
|
57 | 57 | $cleanedOptions[$name] = $value; |
58 | 58 | } |
59 | 59 |
@@ -91,8 +91,9 @@ |
||
91 | 91 | // Remove options with empty values |
92 | 92 | $cleanedOptions = array(); |
93 | 93 | foreach ($options as $name=>$value) { |
94 | - if ($value!==null) |
|
95 | - $cleanedOptions[$name] = $value; |
|
94 | + if ($value!==null) { |
|
95 | + $cleanedOptions[$name] = $value; |
|
96 | + } |
|
96 | 97 | } |
97 | 98 | |
98 | 99 | return $cleanedOptions; |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | case 'last_modified': $this->setLastModified($value); break; |
94 | 94 | case 'is_classic': $this->getIsClassic($value); break; |
95 | 95 | default: |
96 | - throw new Exception('Unknown option found in the Audience entity: ' . $name); |
|
96 | + throw new Exception('Unknown option found in the Audience entity: '.$name); |
|
97 | 97 | } |
98 | 98 | } |
99 | 99 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | // Remove options with empty values |
120 | 120 | $cleanedOptions = array(); |
121 | 121 | foreach ($options as $name=>$value) { |
122 | - if ($value!==null) |
|
122 | + if ($value !== null) |
|
123 | 123 | $cleanedOptions[$name] = $value; |
124 | 124 | } |
125 | 125 |
@@ -91,8 +91,9 @@ |
||
91 | 91 | // Remove options with empty values |
92 | 92 | $cleanedOptions = array(); |
93 | 93 | foreach ($options as $name=>$value) { |
94 | - if ($value!==null) |
|
95 | - $cleanedOptions[$name] = $value; |
|
94 | + if ($value!==null) { |
|
95 | + $cleanedOptions[$name] = $value; |
|
96 | + } |
|
96 | 97 | } |
97 | 98 | |
98 | 99 | return $cleanedOptions; |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | case 'socket_token': $this->setSocketToken($value); break; |
130 | 130 | case 'description': $this->setDescription($value); break; |
131 | 131 | default: |
132 | - throw new Exception('Unknown option found in the Project entity: ' . $name); |
|
132 | + throw new Exception('Unknown option found in the Project entity: '.$name); |
|
133 | 133 | } |
134 | 134 | } |
135 | 135 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | 'platform' => $this->getPlatform(), |
148 | 148 | 'sdks' => $this->getSdks(), |
149 | 149 | 'status' => $this->getStatus(), |
150 | - 'web_snippet' => $this->getWebSnippet()?$this->getWebSnippet()->toArray():null, |
|
150 | + 'web_snippet' => $this->getWebSnippet() ? $this->getWebSnippet()->toArray() : null, |
|
151 | 151 | 'created' => $this->getCreated(), |
152 | 152 | 'id' => $this->getId(), |
153 | 153 | 'is_classic' => $this->getIsClassic(), |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | // Remove options with empty values |
160 | 160 | $cleanedOptions = array(); |
161 | 161 | foreach ($options as $name=>$value) { |
162 | - if ($value!==null) |
|
162 | + if ($value !== null) |
|
163 | 163 | $cleanedOptions[$name] = $value; |
164 | 164 | } |
165 | 165 |
@@ -91,8 +91,9 @@ |
||
91 | 91 | // Remove options with empty values |
92 | 92 | $cleanedOptions = array(); |
93 | 93 | foreach ($options as $name=>$value) { |
94 | - if ($value!==null) |
|
95 | - $cleanedOptions[$name] = $value; |
|
94 | + if ($value!==null) { |
|
95 | + $cleanedOptions[$name] = $value; |
|
96 | + } |
|
96 | 97 | } |
97 | 98 | |
98 | 99 | return $cleanedOptions; |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | case 'reach': $this->setReach(new ExperimentVariationReach($value)); break; |
76 | 76 | case 'start_time': $this->setStartTime($value); break; |
77 | 77 | default: |
78 | - throw new Exception('Unknown option found in the ExperimentVariationReach entity: ' . $name); |
|
78 | + throw new Exception('Unknown option found in the ExperimentVariationReach entity: '.$name); |
|
79 | 79 | } |
80 | 80 | } |
81 | 81 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | 'end_time' => $this->getEndTime(), |
91 | 91 | 'experiment_id' => $this->getExperimentId(), |
92 | 92 | 'metrics' => array(), |
93 | - 'reach' => $this->getReach()?$this->getReach()->toArray():null, |
|
93 | + 'reach' => $this->getReach() ? $this->getReach()->toArray() : null, |
|
94 | 94 | 'start_time' => $this->getStartTime() |
95 | 95 | ); |
96 | 96 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | // Remove options with empty values |
102 | 102 | $cleanedOptions = array(); |
103 | 103 | foreach ($options as $name=>$value) { |
104 | - if ($value!==null) |
|
104 | + if ($value !== null) |
|
105 | 105 | $cleanedOptions[$name] = $value; |
106 | 106 | } |
107 | 107 |
@@ -91,8 +91,9 @@ |
||
91 | 91 | // Remove options with empty values |
92 | 92 | $cleanedOptions = array(); |
93 | 93 | foreach ($options as $name=>$value) { |
94 | - if ($value!==null) |
|
95 | - $cleanedOptions[$name] = $value; |
|
94 | + if ($value!==null) { |
|
95 | + $cleanedOptions[$name] = $value; |
|
96 | + } |
|
96 | 97 | } |
97 | 98 | |
98 | 99 | return $cleanedOptions; |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | case 'id': $this->setId($value); break; |
142 | 142 | case 'experiment_priorities': $this->setExperimentPriorities($value); break; |
143 | 143 | default: |
144 | - throw new Exception('Unknown option found in the Campaign entity: ' . $name); |
|
144 | + throw new Exception('Unknown option found in the Campaign entity: '.$name); |
|
145 | 145 | } |
146 | 146 | } |
147 | 147 | } |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | // Remove options with empty values |
181 | 181 | $cleanedOptions = array(); |
182 | 182 | foreach ($options as $name=>$value) { |
183 | - if ($value!==null) |
|
183 | + if ($value !== null) |
|
184 | 184 | $cleanedOptions[$name] = $value; |
185 | 185 | } |
186 | 186 |
@@ -91,8 +91,9 @@ |
||
91 | 91 | // Remove options with empty values |
92 | 92 | $cleanedOptions = array(); |
93 | 93 | foreach ($options as $name=>$value) { |
94 | - if ($value!==null) |
|
95 | - $cleanedOptions[$name] = $value; |
|
94 | + if ($value!==null) { |
|
95 | + $cleanedOptions[$name] = $value; |
|
96 | + } |
|
96 | 97 | } |
97 | 98 | |
98 | 99 | return $cleanedOptions; |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | case 'latest': $this->setLatest($value); break; |
217 | 217 | case 'url_targeting': $this->setUrlTargeting(new UrlTargeting($value)); break; |
218 | 218 | default: |
219 | - throw new Exception('Unknown option found in the Experiment entity: ' . $name); |
|
219 | + throw new Exception('Unknown option found in the Experiment entity: '.$name); |
|
220 | 220 | } |
221 | 221 | } |
222 | 222 | } |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | 'key' => $this->getKey(), |
237 | 237 | 'last_modified' => $this->getLastModified(), |
238 | 238 | 'name' => $this->getName(), |
239 | - 'schedule' => $this->getSchedule()?$this->getSchedule()->toArray():null, |
|
239 | + 'schedule' => $this->getSchedule() ? $this->getSchedule()->toArray() : null, |
|
240 | 240 | 'status' => $this->getStatus(), |
241 | 241 | 'id' => $this->getId(), |
242 | 242 | 'is_classic' => $this->getIsClassic(), |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | // Remove options with empty values |
280 | 280 | $cleanedOptions = array(); |
281 | 281 | foreach ($options as $name=>$value) { |
282 | - if ($value!==null) |
|
282 | + if ($value !== null) |
|
283 | 283 | $cleanedOptions[$name] = $value; |
284 | 284 | } |
285 | 285 |
@@ -401,6 +401,9 @@ discard block |
||
401 | 401 | return $this->schedule; |
402 | 402 | } |
403 | 403 | |
404 | + /** |
|
405 | + * @param Schedule $schedule |
|
406 | + */ |
|
404 | 407 | public function setSchedule($schedule) |
405 | 408 | { |
406 | 409 | $this->schedule = $schedule; |
@@ -521,6 +524,9 @@ discard block |
||
521 | 524 | return $this->urlTargeting; |
522 | 525 | } |
523 | 526 | |
527 | + /** |
|
528 | + * @param UrlTargeting $urlTargeting |
|
529 | + */ |
|
524 | 530 | public function setUrlTargeting($urlTargeting) |
525 | 531 | { |
526 | 532 | $this->urlTargeting = $urlTargeting; |