File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 2121
2222class Experiment
2323{
24+ /**
25+ * @const string String denoting running state of experiment.
26+ */
27+ const STATUS_RUNNING = 'Running ' ;
28+
29+ /**
30+ * @const string String denoting policy of mutually exclusive group.
31+ */
32+ const MUTEX_GROUP_POLICY = 'random ' ;
33+
2434 /**
2535 * @var string Experiment ID.
2636 */
@@ -262,7 +272,7 @@ public function setTrafficAllocation($trafficAllocation)
262272 */
263273 public function isInMutexGroup ()
264274 {
265- return !is_null ($ this ->_groupPolicy ) && $ this ->_groupPolicy == ' random ' ;
275+ return !is_null ($ this ->_groupPolicy ) && $ this ->_groupPolicy == self :: MUTEX_GROUP_POLICY ;
266276 }
267277
268278 /**
@@ -272,7 +282,7 @@ public function isInMutexGroup()
272282 */
273283 public function isExperimentRunning ()
274284 {
275- return !is_null ($ this ->_status ) && $ this ->_status == ' Running ' ;
285+ return !is_null ($ this ->_status ) && $ this ->_status == self :: STATUS_RUNNING ;
276286 }
277287
278288 /**
You can’t perform that action at this time.
0 commit comments