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

Removed double mt_rand call

This commit is contained in:
Geoffrey Brier 2012-05-31 10:48:18 +02:00
parent a3450aa96c
commit 4ce21f9875

View File

@ -46,7 +46,7 @@ class Lorem extends \Faker\Provider\Base
} else {
$nbWords = ($nbWords * mt_rand(60, 140) / 100) + 1;
}
$words = static::words($nbWords + mt_rand(-2, 2));
$words = static::words($nbWords);
$words[0] = ucwords($words[0]);
return join($words, ' ') . '.';
@ -82,7 +82,7 @@ class Lorem extends \Faker\Provider\Base
} else {
$nbSentences = ($nbSentences * mt_rand(60, 140) / 100) + 1;
}
return join(static::sentences($nbSentences + mt_rand(-1, 1)), ' ');
return join(static::sentences($nbSentences), ' ');
}
/**