@@ 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 | } |
@@ 201-208 (lines=8) @@ | ||
198 | case 'name': $this->setName($value); break; |
|
199 | case 'schedule': $this->setSchedule(new Schedule($value)); break; |
|
200 | case 'status': $this->setStatus($value); break; |
|
201 | case 'variations': { |
|
202 | $variations = array(); |
|
203 | foreach ($value as $variationInfo) { |
|
204 | $variations[] = new Variation($variationInfo); |
|
205 | } |
|
206 | $this->setVariations($variations); |
|
207 | break; |
|
208 | } |
|
209 | case 'id': $this->setId($value); break; |
|
210 | case 'is_classic': $this->setIsClassic($value); break; |
|
211 | case 'type': $this->setType($value); break; |