fzaninotto/Faker — pull request #373 by pinktrink (2014-07-22 04:40:49+00:00)
Title: Add MaxGenerator to Faker.

MaxGenerator will allow the use of `$faker->max($num)->something` to
only return a maximum of $num different results.

I'm not sure if this functionality exists already, as I've only minimally messed with Faker for doing a bit of fuzz testing, and haven't really had time to fully explore the codebase. The problem I ran into was that while generating random data, I also wanted to ensure that collisions existed within the dataset I was generating. The solution was to add `MaxGenerator` and expose a `max()` method on `\Faker\Provider\Base` which would allow me to limit the data I would receive.