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 21
21
22
22
class Experiment
23
23
{
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
+
24
34
/**
25
35
* @var string Experiment ID.
26
36
*/
@@ -262,7 +272,7 @@ public function setTrafficAllocation($trafficAllocation)
262
272
*/
263
273
public function isInMutexGroup ()
264
274
{
265
- return !is_null ($ this ->_groupPolicy ) && $ this ->_groupPolicy == ' random ' ;
275
+ return !is_null ($ this ->_groupPolicy ) && $ this ->_groupPolicy == self :: MUTEX_GROUP_POLICY ;
266
276
}
267
277
268
278
/**
@@ -272,7 +282,7 @@ public function isInMutexGroup()
272
282
*/
273
283
public function isExperimentRunning ()
274
284
{
275
- return !is_null ($ this ->_status ) && $ this ->_status == ' Running ' ;
285
+ return !is_null ($ this ->_status ) && $ this ->_status == self :: STATUS_RUNNING ;
276
286
}
277
287
278
288
/**
You can’t perform that action at this time.
0 commit comments