Skip to content

Commit 970caf8

Browse files
authored
Merge pull request #127 from Quazz/master
Prevent errors in getRandomNumber call on PHP 8.1
2 parents b9c5f58 + b5c7820 commit 970caf8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Service/Anonymize/Anonymizer/Number.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public function __construct(
2929
?int $min = null,
3030
?int $max = null
3131
) {
32-
$this->min = $min !== null && $min < PHP_INT_MIN ? PHP_INT_MIN : $min;
33-
$this->max = $max !== null && $max < PHP_INT_MAX ? PHP_INT_MAX : $max;
32+
$this->min = $min < PHP_INT_MIN ? PHP_INT_MIN : $min;
33+
$this->max = $max !== null && $max > PHP_INT_MAX ? PHP_INT_MAX : $max;
3434
}
3535

3636
/**

0 commit comments

Comments
 (0)