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

Commit

Permalink
Merge pull request #552 from kletellier/change_fr_provider
Browse files Browse the repository at this point in the history
Add mobile phone function in fr_FR provider
  • Loading branch information
fzaninotto committed May 20, 2015
2 parents b7371e6 + ae71113 commit d86496c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/Faker/Provider/fr_FR/PhoneNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,23 @@ class PhoneNumber extends \Faker\Provider\PhoneNumber
'08 ## ## ## ##',
'09 ## ## ## ##',
);

// Mobile phone numbers start by 06 and 07
// 06 is the most common prefix
protected static $mobileFormats = array(
'+33 6 ## ## ## ##',
'+33 7 ## ## ## ##',
'06########',
'07########',
'06 ## ## ## ##',
'07 ## ## ## ##',
);

/**
* @example '0601020304'
*/
public static function mobileNumber()
{
return static::numerify(static::randomElement(static::$mobileFormats));
}
}

0 comments on commit d86496c

Please sign in to comment.