Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Faker\Provider\en_NZ;
4
 
5
class PhoneNumber extends \Faker\Provider\PhoneNumber
6
{
7
    /**
8
     * An array of en_NZ landline phone number formats
9
     *
10
     * @var array
11
     */
12
    protected static $formats = [
13
        // National Calls
14
        '{{areaCode}}{{beginningNumber}}######',
15
        '{{areaCode}} {{beginningNumber}}## ####',
16
    ];
17
 
18
    /**
19
     * An array of en_NZ mobile (cell) phone number formats
20
     *
21
     * @var array
22
     */
23
    protected static $mobileFormats = [
24
        // Local
25
        '02########',
26
        '02#########',
27
        '02# ### ####',
28
        '02# #### ####',
29
    ];
30
 
31
    /**
32
     * An array of toll free phone number formats
33
     *
34
     * @var array
35
     */
36
    protected static $tollFreeFormats = [
37
        '0508######',
38
        '0508 ######',
39
        '0508 ### ###',
40
        '0800######',
41
        '0800 ######',
42
        '0800 ### ###',
43
    ];
44
 
45
    /**
46
     * An array of en_NZ landline area codes
47
     *
48
     * @var array
49
     */
50
    protected static $areaCodes = [
51
        '02', '03', '04', '06', '07', '09',
52
    ];
53
 
54
    /**
55
     * An array of en_NZ landline beginning numbers
56
     *
57
     * @var array
58
     */
59
    protected static $beginningNumbers = [
60
        '2', '3', '4', '5', '6', '7', '8', '9',
61
    ];
62
 
63
    /**
64
     * Return a en_NZ mobile phone number
65
     *
66
     * @return string
67
     */
68
    public static function mobileNumber()
69
    {
70
        return static::numerify(static::randomElement(static::$mobileFormats));
71
    }
72
 
73
    /**
74
     * Return a en_NZ toll free phone number
75
     *
76
     * @return string
77
     */
78
    public static function tollFreeNumber()
79
    {
80
        return static::numerify(static::randomElement(static::$tollFreeFormats));
81
    }
82
 
83
    /**
84
     * Return a en_NZ landline area code
85
     *
86
     * @return string
87
     */
88
    public static function areaCode()
89
    {
90
        return static::numerify(static::randomElement(static::$areaCodes));
91
    }
92
 
93
    /**
94
     * Return a en_NZ landline beginning number
95
     *
96
     * @return string
97
     */
98
    public static function beginningNumber()
99
    {
100
        return static::numerify(static::randomElement(static::$beginningNumbers));
101
    }
102
}