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

Fixes #925: Invalid E.164 format for pt_PT PhoneNumber Provider #926

Draft
wants to merge 2 commits into
base: 2.0
Choose a base branch
from

Conversation

Head0nF1re
Copy link

@Head0nF1re Head0nF1re commented Dec 13, 2024

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 and e164LandlineNumber 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 the mobileNumber method is static, will need to verify that in another time.

Author's checklist

Review checklist

  • All checks have passed
  • Changes are added to the CHANGELOG.md
  • Changes are approved by maintainer

- 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' and 'e164LandlineNumber' to provide
  mobile-only and landline-only phone numbers, respectively.
@Head0nF1re Head0nF1re changed the title Fixes FakerPHP/Faker#925 Fixes #925 Dec 13, 2024
@Head0nF1re Head0nF1re changed the title Fixes #925 Fixes #925: Invalid E.164 format for pt_PT PhoneNumber Provider Dec 13, 2024
- Add consts in order to be able to merge AREA_CODE and
  MOBILE_SERVICE_CODE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid E.164 format for pt_PT PhoneNumber Provider
1 participant