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

pt_BR: more flexibility to cellphone generation #623

Merged

Conversation

igorsantos07
Copy link
Contributor

Currently a boolean is used to define if the cellphone should
contain the ninth digit or not. This was extended so if an area
code needs to be enforced, it can be generated externally and given
to the cellphone generator, and it will create a correct number.

This wasn't made in the same branch as #622 since it's changing a method's argument, and it could create a little controversy. But in the end the behaviour is still backwards compatible :)

Currently a boolean is used to define if the cellphone should
contain the ninth digit or not. This was extended so if an area
code needs to be enforced, it can be generated externally and given
to the cellphone generator, and it will create a correct number.
@fzaninotto
Copy link
Owner

I don't understand. A user passing an area code will get a leading 9. What's the difference with a boolean parameter?

@igorsantos07
Copy link
Contributor Author

If you ask for the phone number only the boolean is used to allow for the additional digit or not. If you pass in the area code, it will be used to verify if the ninth digit is needed.

fzaninotto added a commit that referenced this pull request Sep 8, 2015
…igit

pt_BR: more flexibility to cellphone generation
@fzaninotto fzaninotto merged commit 4d1acaf into fzaninotto:master Sep 8, 2015
@fzaninotto
Copy link
Owner

Thanks!

@igorsantos07 igorsantos07 deleted the pt_BR-areaCodeDefinesNinthDigit branch September 8, 2015 16:51
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