Fixes #925: Invalid E.164 format for pt_PT PhoneNumber Provider #926
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Override
$e164Formats
in order to provide locale specific phone numbers (mobile and landline) in E.164 format.Add constants / static properties for common formatting codes (country, area and mobile service).
Add methods
e164MobileNumber
ande164LandlineNumber
to provide mobile-only and landline-only phone numbers, respectively.What is the reason for this PR?
Note: Will add some tests later on. Also, I wanted to use the same "formatting rules" for
$mobileNumberPrefixes
but I think there is some issue with the{{ }}
substitution since themobileNumber
method is static, will need to verify that in another time.Author's checklist
Review checklist
CHANGELOG.md