diff --git a/src/Framework/Constraint/IsIdentical.php b/src/Framework/Constraint/IsIdentical.php index ed0d6f4c6f5..8052232f4a0 100644 --- a/src/Framework/Constraint/IsIdentical.php +++ b/src/Framework/Constraint/IsIdentical.php @@ -34,11 +34,6 @@ */ final class IsIdentical extends Constraint { - /** - * @var float - */ - private const EPSILON = 0.0000000001; - /** * @var mixed */ @@ -67,7 +62,7 @@ public function evaluate($other, string $description = '', bool $returnResult = if (is_float($this->value) && is_float($other) && !is_infinite($this->value) && !is_infinite($other) && !is_nan($this->value) && !is_nan($other)) { - $success = abs($this->value - $other) < self::EPSILON; + $success = abs($this->value - $other) < PHP_FLOAT_EPSILON; } else { $success = $this->value === $other; }