@@ 65-72 (lines=8) @@ | ||
62 | case 'total_count': $this->setTotalCount($value); break; |
|
63 | case 'treatment_count': $this->setTreatmentCount($value); break; |
|
64 | case 'treatment_reach': $this->setTreatmentReach($value); break; |
|
65 | case 'variations': { |
|
66 | $variations = array(); |
|
67 | foreach ($value as $name=>$variationInfo) { |
|
68 | $variations[$name] = new VariationReach($variationInfo); |
|
69 | } |
|
70 | $this->setVariations($variations); |
|
71 | break; |
|
72 | } |
|
73 | default: |
|
74 | throw new Exception('Unknown option: ' . $name); |
|
75 | } |
@@ 185-192 (lines=8) @@ | ||
182 | case 'name': $this->setName($value); break; |
|
183 | case 'schedule': $this->setSchedule(new Schedule($value)); break; |
|
184 | case 'status': $this->setStatus($value); break; |
|
185 | case 'variations': { |
|
186 | $variations = array(); |
|
187 | foreach ($value as $variationInfo) { |
|
188 | $variations[] = new Variation($variationInfo); |
|
189 | } |
|
190 | $this->setVariations($variations); |
|
191 | break; |
|
192 | } |
|
193 | case 'id': $this->setId($value); break; |
|
194 | case 'is_classic': $this->setIsClassic($value); break; |
|
195 | case 'type': $this->setType($value); break; |