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

Remove whitespace from beginning of el_GR phone numbers #105

Merged
merged 5 commits into from
Dec 4, 2020
Merged

Remove whitespace from beginning of el_GR phone numbers #105

merged 5 commits into from
Dec 4, 2020

Conversation

krsriq
Copy link

@krsriq krsriq commented Dec 3, 2020

Signed-off-by: Daniel Schmelz daniel@schmelz.org

What is the reason for this PR?

Greek phone numbers have a whitespace at the beginning of the string because they are generated by combining an internationalCodePrefix with the rest of the number.

'{{internationalCodePrefix}} {{mobileCode}} ### ####',

This prefix may be empty

protected static $internationalCallPrefixes = ['', '+30'];

which results in a leading space.

  • A new feature
  • Fixed an issue (resolve #ID)

Author's checklist

Summary of changes

Fixes the issue by trimming the generated phone numbers, covered by tests.

Review checklist

  • All checks have passed
  • Changes are approved by maintainer

Signed-off-by: Daniel Schmelz <daniel@schmelz.org>
@GrahamCampbell
Copy link
Member

Do we need a trim, or will ltrim do? Also, can you rebase please?

@krsriq
Copy link
Author

krsriq commented Dec 4, 2020

Do we need a trim, or will ltrim do?

You're right, there are only leading spaces to remove here - thanks.

Also, can you rebase please?

Yes, will do.

IonBazan and others added 4 commits December 4, 2020 16:05
* avoid mt_rand usage

* avoid mt_rand usage in Guessers

* use int literal

* use PHP_INT_MAX for big numbers

* use self::numberBetween() instead
* simplify tests

* use assert methods instead of comparisons
Signed-off-by: Daniel Schmelz <daniel@schmelz.org>
@GrahamCampbell GrahamCampbell merged commit e240298 into FakerPHP:main Dec 4, 2020
@GrahamCampbell
Copy link
Member

Great, thanks.

@krsriq krsriq deleted the fix_GR_phone_numbers branch December 4, 2020 16:13
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.

3 participants