| @@ 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 | } |
|
| @@ 180-187 (lines=8) @@ | ||
| 177 | case 'name': $this->setName($value); break; |
|
| 178 | case 'schedule': $this->setSchedule(new Schedule($value)); break; |
|
| 179 | case 'status': $this->setStatus($value); break; |
|
| 180 | case 'variations': { |
|
| 181 | $variations = array(); |
|
| 182 | foreach ($value as $variationInfo) { |
|
| 183 | $variations[] = new Variation($variationInfo); |
|
| 184 | } |
|
| 185 | $this->setVariations($variations); |
|
| 186 | break; |
|
| 187 | } |
|
| 188 | case 'id': $this->setId($value); break; |
|
| 189 | case 'is_classic': $this->setIsClassic($value); break; |
|
| 190 | case 'type': $this->setType($value); break; |
|