-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Conversation
); | ||
|
||
/** | ||
* @return czech birth number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you link to a definition of what a birth number is?
public function birthNumber($gender = null, $minAge = 0, $maxAge = 100, $slashProbability = 50) | ||
{ | ||
if ($gender == null) { | ||
$gender = Miscellaneous::boolean() ? static::GENDER_MALE : static::GENDER_FEMALE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use the static boolean()
provider - this prevents users from overriding it. Instead, please use $this->generator->boolean()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tried $this->generator->boolean()
, but it gives me this error:
InvalidArgumentException: Unknown formatter "boolean"
/Users/ricoo/Drive/work/faker/src/Faker/Generator.php:171
/Users/ricoo/Drive/work/faker/src/Faker/Generator.php:153
/Users/ricoo/Drive/work/faker/src/Faker/Generator.php:197
/Users/ricoo/Drive/work/faker/src/Faker/Provider/cs_CZ/Person.php:440
/Users/ricoo/Drive/work/faker/src/Faker/Provider/cs_CZ/Person.php:440
/Users/ricoo/Drive/work/faker/src/Faker/Generator.php:153
/Users/ricoo/Drive/work/faker/src/Faker/Generator.php:197
/Users/ricoo/Drive/work/faker/test/Faker/Provider/cs_CZ/PersonTest.php:16
/Users/ricoo/Drive/work/faker/test/Faker/Provider/cs_CZ/PersonTest.php:16
/Users/ricoo/.composer/vendor/phpunit/phpunit/src/TextUI/Command.php:152
/Users/ricoo/.composer/vendor/phpunit/phpunit/src/TextUI/Command.php:104
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is because you must add the Miscellaneous
provider in your test, after line 13
Fixed. |
Thanks! |
No description provided.