Rule::OPERATOR_LTE =>
$actual <=
$expected,
Rule::OPERATOR_EQ =>
$actual ===
$expected,
Rule::OPERATOR_GT =>
$actual >
$expected,
Rule::OPERATOR_LT =>
$actual <
$expected,
default =>
throw new UnsupportedOperatorException($operator, self::
class),
};
} private static function floatMatch(string
$operator, float
$actual, float
$expected): bool
{ return match ($operator) { Rule::OPERATOR_NEQ => FloatComparator::
notEquals($actual,
$expected),
Rule::OPERATOR_GTE => FloatComparator::
greaterThanOrEquals($actual,
$expected),
Rule::OPERATOR_LTE => FloatComparator::
lessThanOrEquals($actual,
$expected),
Rule::OPERATOR_EQ => FloatComparator::
equals($actual,
$expected),
Rule::OPERATOR_GT => FloatComparator::
greaterThan($actual,
$expected),
Rule::OPERATOR_LT => FloatComparator::
lessThan($actual,
$expected),
default =>
throw new UnsupportedOperatorException($operator, self::
class),
};
} /**
* @param array<string, string> $renderedField
*
* @return Constraint[]
*/