Skip to content

Commit 00654fc

Browse files
committed
Fix psalm warnings
1 parent 5010405 commit 00654fc

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

src/RuleBased/Condition.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ class Condition
2222
/**
2323
* Constructor
2424
*
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.
2628
*/
2729
public function __construct(
2830
protected string $property,
@@ -34,7 +36,7 @@ public function __construct(
3436
/**
3537
* Check if a condition matches $context
3638
*
37-
* @param \FeatureFlags\RuleBased\FeaturreContext
39+
* @param \FeatureFlags\RuleBased\FeatureContext $context The feature context to match with
3840
* @return bool
3941
*/
4042
public function match(FeatureContext $context): bool

src/RuleBased/Feature.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Feature
99
* Constructor
1010
*
1111
* @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.
1313
*/
1414
public function __construct(
1515
protected string $name,
@@ -20,7 +20,7 @@ public function __construct(
2020
/**
2121
* Check if the $context matches a segment in this feature.
2222
*
23-
* @param \Feature\FeatureContext $context
23+
* @param \FeatureFlags\RuleBased\FeatureContext $context
2424
* @return bool
2525
*/
2626
public function match(FeatureContext $context): bool
@@ -39,7 +39,7 @@ public function match(FeatureContext $context): bool
3939
*
4040
* @param string $name The name of the feature flagl
4141
* @param array $config An array of cofiguration and segmented users
42-
* @return \FeatureFlags\Feature
42+
* @return \FeatureFlags\RuleBased\Feature
4343
*/
4444
public static function fromArray(string $name, array $config): Feature
4545
{

src/RuleBased/Segment.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Segment
2424
* Constructor for segment
2525
*
2626
* @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
2828
*/
2929
public function __construct(
3030
protected string $name,
@@ -36,7 +36,7 @@ public function __construct(
3636
/**
3737
* Check if a segment's conditions match $context
3838
*
39-
* @param \FeatureFlags\RuleBased\FeaturreContext
39+
* @param \FeatureFlags\RuleBased\FeatureContext $context Feature context to match against
4040
* @return bool
4141
*/
4242
public function match(FeatureContext $context): bool
@@ -61,8 +61,8 @@ public function match(FeatureContext $context): bool
6161
/**
6262
* Create a segment from an array of configuration
6363
*
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
6666
*/
6767
public static function fromArray(array $config): Segment
6868
{

0 commit comments

Comments
 (0)