File tree 3 files changed +11
-9
lines changed
3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ class Condition
22
22
/**
23
23
* Constructor
24
24
*
25
- * @param string $name The name of the feature.
25
+ * @param string $property The property name for the condition
26
+ * @param string $op The operator for the field of the feature.
27
+ * @param string|array|int|float|bool $value The value to compare against.
26
28
*/
27
29
public function __construct (
28
30
protected string $ property ,
@@ -34,7 +36,7 @@ public function __construct(
34
36
/**
35
37
* Check if a condition matches $context
36
38
*
37
- * @param \FeatureFlags\RuleBased\FeaturreContext
39
+ * @param \FeatureFlags\RuleBased\FeatureContext $context The feature context to match with
38
40
* @return bool
39
41
*/
40
42
public function match (FeatureContext $ context ): bool
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ class Feature
9
9
* Constructor
10
10
*
11
11
* @param string $name The name of the feature.
12
- * @var array<\Feature \Segment> $segments List of segments in the feature that are combined with OR.
12
+ * @param array<\FeatureFlags\RuleBased \Segment> $segments List of segments in the feature that are combined with OR.
13
13
*/
14
14
public function __construct (
15
15
protected string $ name ,
@@ -20,7 +20,7 @@ public function __construct(
20
20
/**
21
21
* Check if the $context matches a segment in this feature.
22
22
*
23
- * @param \Feature \FeatureContext $context
23
+ * @param \FeatureFlags\RuleBased \FeatureContext $context
24
24
* @return bool
25
25
*/
26
26
public function match (FeatureContext $ context ): bool
@@ -39,7 +39,7 @@ public function match(FeatureContext $context): bool
39
39
*
40
40
* @param string $name The name of the feature flagl
41
41
* @param array $config An array of cofiguration and segmented users
42
- * @return \FeatureFlags\Feature
42
+ * @return \FeatureFlags\RuleBased\ Feature
43
43
*/
44
44
public static function fromArray (string $ name , array $ config ): Feature
45
45
{
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class Segment
24
24
* Constructor for segment
25
25
*
26
26
* @param string $name The name of the segment
27
- * @param array<\Feature \Condition> $conditions The conditions that are combined with AND
27
+ * @param array<\FeatureFlags\RuleBased \Condition> $conditions The conditions that are combined with AND
28
28
*/
29
29
public function __construct (
30
30
protected string $ name ,
@@ -36,7 +36,7 @@ public function __construct(
36
36
/**
37
37
* Check if a segment's conditions match $context
38
38
*
39
- * @param \FeatureFlags\RuleBased\FeaturreContext
39
+ * @param \FeatureFlags\RuleBased\FeatureContext $context Feature context to match against
40
40
* @return bool
41
41
*/
42
42
public function match (FeatureContext $ context ): bool
@@ -61,8 +61,8 @@ public function match(FeatureContext $context): bool
61
61
/**
62
62
* Create a segment from an array of configuration
63
63
*
64
- * @param array $config The data for a condition
65
- * @return \FeatureFlags\RuleBased\Condition
64
+ * @param array $config The data for a segment
65
+ * @return \FeatureFlags\RuleBased\Segment
66
66
*/
67
67
public static function fromArray (array $ config ): Segment
68
68
{
You can’t perform that action at this time.
0 commit comments