Address.php
5 years ago
Company.php
5 years ago
Internet.php
5 years ago
Payment.php
5 years ago
Person.php
5 years ago
PhoneNumber.php
5 years ago
PhoneNumber.php
51 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Faker\Provider\pt_PT; |
| 4 | |
| 5 | class PhoneNumber extends \Faker\Provider\PhoneNumber |
| 6 | { |
| 7 | /* |
| 8 | * @link http://en.wikipedia.org/wiki/Telephone_numbers_in_Portugal |
| 9 | */ |
| 10 | protected static $formats = array( |
| 11 | '+351 91#######', |
| 12 | '+351 92#######', |
| 13 | '+351 93#######', |
| 14 | '+351 96#######', |
| 15 | '+351 21#######', |
| 16 | '+351 22#######', |
| 17 | '+351 23#######', |
| 18 | '+351 24#######', |
| 19 | '+351 25#######', |
| 20 | '+351 26#######', |
| 21 | '+351 27#######', |
| 22 | '+351 28#######', |
| 23 | '+351 29#######', |
| 24 | '91#######', |
| 25 | '92#######', |
| 26 | '93#######', |
| 27 | '96#######', |
| 28 | '21#######', |
| 29 | '22#######', |
| 30 | '23#######', |
| 31 | '24#######', |
| 32 | '25#######', |
| 33 | '26#######', |
| 34 | '27#######', |
| 35 | '28#######', |
| 36 | '29#######', |
| 37 | ); |
| 38 | |
| 39 | protected static $mobileNumberPrefixes = array( |
| 40 | '91#######', |
| 41 | '92#######', |
| 42 | '93#######', |
| 43 | '96#######', |
| 44 | ); |
| 45 | |
| 46 | public static function mobileNumber() |
| 47 | { |
| 48 | return static::numerify(static::randomElement(static::$mobileNumberPrefixes)); |
| 49 | } |
| 50 | } |
| 51 |