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

US phone numbers #615

Merged
merged 5 commits into from
Aug 24, 2015
Merged

US phone numbers #615

merged 5 commits into from
Aug 24, 2015

Conversation

okj579
Copy link
Contributor

@okj579 okj579 commented Jun 20, 2015

This implements the rules for the North American Numbering Plan (NANP). It does not generate numbers including so-called "easily recognizable codes" which are used for various special services and not assigned to geographic regions, for example 911 (emergency), 411 (directory), 511 (traffic information) or 800 (toll-free).

Toll-free numbers can be generated with tollFreePhoneNumber().

Fixes #588

@@ -9,8 +9,8 @@ class PhoneNumber extends \Faker\Provider\Base
/**
* @example '555-123-546'
*/
public static function phoneNumber()
public function phoneNumber()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break many locales overriding this method with a static one. If you change it here, you must change it in locales, too.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I just saw that you actually did that further down in the PR ;)

@fzaninotto
Copy link
Owner

Good PR, needs a few tweaks but definitely worth merging!

fzaninotto added a commit that referenced this pull request Aug 24, 2015
@fzaninotto fzaninotto merged commit bff9c70 into fzaninotto:master Aug 24, 2015
@fzaninotto
Copy link
Owner

Thanks!

@okj579 okj579 deleted the issue-588 branch August 25, 2015 18:36
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