Address.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
44 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Faker\Provider\en_GB; |
| 4 | |
| 5 | class PhoneNumber extends \Faker\Provider\PhoneNumber |
| 6 | { |
| 7 | protected static $formats = array( |
| 8 | '+44(0)##########', |
| 9 | '+44(0)#### ######', |
| 10 | '+44(0)#########', |
| 11 | '+44(0)#### #####', |
| 12 | '0##########', |
| 13 | '0#########', |
| 14 | '0#### ######', |
| 15 | '0#### #####', |
| 16 | '0### ### ####', |
| 17 | '0### #######', |
| 18 | '(0####) ######', |
| 19 | '(0####) #####', |
| 20 | '(0###) ### ####', |
| 21 | '(0###) #######', |
| 22 | ); |
| 23 | |
| 24 | /** |
| 25 | * An array of en_GB mobile (cell) phone number formats |
| 26 | * @var array |
| 27 | */ |
| 28 | protected static $mobileFormats = array( |
| 29 | // Local |
| 30 | '07#########', |
| 31 | '07### ######', |
| 32 | '07### ### ###' |
| 33 | ); |
| 34 | |
| 35 | /** |
| 36 | * Return a en_GB mobile phone number |
| 37 | * @return string |
| 38 | */ |
| 39 | public static function mobileNumber() |
| 40 | { |
| 41 | return static::numerify(static::randomElement(static::$mobileFormats)); |
| 42 | } |
| 43 | } |
| 44 |