Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v1.3.0] Create country constants #84

Closed
AlexOlival opened this issue Oct 8, 2020 · 0 comments
Closed

[v1.3.0] Create country constants #84

AlexOlival opened this issue Oct 8, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@AlexOlival
Copy link
Collaborator

As one can see in the Java port, it's much better to provide the user with whatever countries are supported rather than have them guess or research what countries can be used:

socrates.validateId('abcd', Country.PT);

As proud as I am of our exception handling for this case, we should create constants for each country and remove it.

e.g.:

$socrates->validateId('xpto', Country::PT);

or

$socrates->validateId('xpto', Country::PORTUGAL);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants