1
0
mirror of https://github.com/fzaninotto/Faker.git synced 2025-04-21 16:01:56 +02:00

Merge pull request #1790 from pimjansen/feature/floor-int-cast

Floor is not always returning an int
This commit is contained in:
Andreas Möller 2019-09-17 23:19:49 +02:00 committed by GitHub
commit 37f93702ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@ class Biased extends Base
$y = mt_rand() / (mt_getrandmax() + 1);
} while (call_user_func($function, $x) < $y);
return floor($x * ($max - $min + 1) + $min);
return (int) floor($x * ($max - $min + 1) + $min);
}
/**