Skip to content

Commit

Permalink
Merge pull request #127 from Quazz/master
Browse files Browse the repository at this point in the history
Prevent errors in getRandomNumber call on PHP 8.1
  • Loading branch information
thomas-kl1 authored Jun 7, 2022
2 parents b9c5f58 + b5c7820 commit 970caf8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Service/Anonymize/Anonymizer/Number.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public function __construct(
?int $min = null,
?int $max = null
) {
$this->min = $min !== null && $min < PHP_INT_MIN ? PHP_INT_MIN : $min;
$this->max = $max !== null && $max < PHP_INT_MAX ? PHP_INT_MAX : $max;
$this->min = $min < PHP_INT_MIN ? PHP_INT_MIN : $min;
$this->max = $max !== null && $max > PHP_INT_MAX ? PHP_INT_MAX : $max;
}

/**
Expand Down

0 comments on commit 970caf8

Please sign in to comment.