We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7295ca8 commit 38c5cefCopy full SHA for 38c5cef
src/Engine/Engine.php
@@ -24,6 +24,9 @@
24
25
class Engine
26
{
27
+ private const float STRONGEST_PRIORITY = -INF;
28
+ private const float WEAKEST_PRIORITY = +INF;
29
+
30
/**
31
* Get the evaluation result for a given context.
32
*
@@ -63,8 +66,8 @@ public static function getEvaluationResult($context): EvaluationResult
63
66
$evaluatedFeature = $evaluatedFeatures[$featureKey] ?? null;
64
67
if ($evaluatedFeature) {
65
68
$overrideWinsPriority =
- ($overrideFeature->priority ?? INF) <
- ($evaluatedFeature->priority ?? INF);
69
+ ($overrideFeature->priority ?? self::WEAKEST_PRIORITY) <
70
+ ($evaluatedFeature->priority ?? self::WEAKEST_PRIORITY);
71
if (!$overrideWinsPriority) {
72
continue;
73
}
0 commit comments