Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Added Czech birth numbers #535

Merged
merged 3 commits into from
Jun 22, 2015
Merged

Added Czech birth numbers #535

merged 3 commits into from
Jun 22, 2015

Conversation

tomasbedrich
Copy link
Contributor

No description provided.

);

/**
* @return czech birth number
Copy link
Owner

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;
Copy link
Owner

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().

Copy link
Contributor Author

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

Copy link
Owner

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

@tomasbedrich
Copy link
Contributor Author

Fixed.

fzaninotto added a commit that referenced this pull request Jun 22, 2015
@fzaninotto fzaninotto merged commit 16b9b99 into fzaninotto:master Jun 22, 2015
@fzaninotto
Copy link
Owner

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants