1
0
mirror of https://github.com/fzaninotto/Faker.git synced 2025-03-19 23:09:47 +01:00

Fixed bug in Faker\Provider\Miscellaneous::boolean

This commit is contained in:
Radosław Mejer 2011-12-04 10:47:27 +01:00
parent 289f11824a
commit 72584f9296

View File

@ -13,7 +13,7 @@ class Miscellaneous extends \Faker\Provider\Base
*/
public static function boolean($chanceOfGettingTrue = 50)
{
return mt_rand(0, 100) <= $chanceOfGettingTrue ? true: false;
return mt_rand(1, 100) <= $chanceOfGettingTrue ? true: false;
}
/**