1 | <?php |
||
14 | class VariantResults |
||
15 | { |
||
16 | /** |
||
17 | * The unique identifier for the Experiment this entity contains results for (if applicable). |
||
18 | * @var integer |
||
19 | */ |
||
20 | private $experimentId; |
||
21 | |||
22 | /** |
||
23 | * Indicates that this variant is the baseline that all other entities will |
||
24 | * be compared against. Also referred to as the 'Control' or 'Control Group'. |
||
25 | * @var boolean |
||
26 | */ |
||
27 | private $isBaseline; |
||
28 | |||
29 | /** |
||
30 | * The relative difference in performance of this variant vs. the baseline |
||
31 | * variant. Lift is calculated as follows: (Winning Conversion Rate % - Old |
||
32 | * Conversion Rate %) - Old Conversion Rate % = % Improvement |
||
33 | * @var Datapoint |
||
34 | */ |
||
35 | private $lift; |
||
36 | |||
37 | /** |
||
38 | * The name of the variant |
||
39 | * @var string |
||
40 | */ |
||
41 | private $name; |
||
42 | |||
43 | /** |
||
44 | * |
||
45 | * @var number |
||
46 | */ |
||
47 | private $rate; |
||
48 | |||
49 | /** |
||
50 | * The scope that this variant represents. Can be 'variation', 'experiment' or 'campaign' |
||
51 | * @var string |
||
52 | */ |
||
53 | private $scope; |
||
54 | |||
55 | /** |
||
56 | * |
||
57 | * @var Datapoint |
||
58 | */ |
||
59 | private $totalIncrease; |
||
60 | |||
61 | /** |
||
62 | * |
||
63 | * @var number |
||
64 | */ |
||
65 | private $value; |
||
66 | |||
67 | /** |
||
68 | * |
||
69 | * @var string |
||
70 | */ |
||
71 | private $variationId; |
||
72 | |||
73 | /** |
||
74 | * Constructor. |
||
75 | */ |
||
76 | 3 | public function __construct($options = array()) |
|
94 | |||
95 | /** |
||
96 | * Returns this object as array. |
||
97 | */ |
||
98 | 1 | public function toArray() |
|
121 | |||
122 | 1 | public function getExperimentId() |
|
126 | |||
127 | 3 | public function setExperimentId($experimentId) |
|
131 | |||
132 | 1 | public function getIsBaseline() |
|
136 | |||
137 | 3 | public function setIsBaseline($isBaseline) |
|
141 | |||
142 | 1 | public function getLift() |
|
146 | |||
147 | 3 | public function setLift($lift) |
|
151 | |||
152 | 1 | public function getName() |
|
156 | |||
157 | 3 | public function setName($name) |
|
161 | |||
162 | 1 | public function getRate() |
|
166 | |||
167 | 3 | public function setRate($rate) |
|
171 | |||
172 | 1 | public function getScope() |
|
176 | |||
177 | 3 | public function setScope($scope) |
|
181 | |||
182 | 1 | public function getTotalIncrease() |
|
186 | |||
187 | 3 | public function setTotalIncrease($totalIncrease) |
|
191 | |||
192 | 1 | public function getValue() |
|
196 | |||
197 | 3 | public function setValue($value) |
|
201 | |||
202 | 1 | public function getVariationId() |
|
206 | |||
207 | 3 | public function setVariationId($variationId) |
|
211 | } |
||
212 | |||
220 |
According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.