PluginProbe ʕ •ᴥ•ʔ
Kubio AI Page Builder / trunk
Kubio AI Page Builder vtrunk
2.9.0 2.8.6 2.8.5 2.8.4 2.8.3 2.8.2 2.8.1 trunk 1.0.0 1.0.1 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.7.0 1.7.1 1.7.2 1.7.3 1.8.0 1.8.1 1.8.2 1.9.0 2.0.0 2.1.1 2.1.2 2.1.3 2.2.0 2.2.3 2.2.4 2.2.5 2.3.0 2.3.1 2.3.3 2.3.4 2.4.0 2.4.1 2.4.2 2.4.3 2.4.5 2.5.0 2.5.1 2.5.2 2.5.3 2.6.0 2.6.1 2.6.2 2.6.3 2.6.5 2.6.6 2.6.7 2.7.0 2.7.1 2.7.2 2.7.3 2.8.0
kubio / vendor / fzaninotto / faker / src / Faker / Provider / fi_FI / PhoneNumber.php
kubio / vendor / fzaninotto / faker / src / Faker / Provider / fi_FI Last commit date
Address.php 1 year ago Company.php 1 year ago Internet.php 1 year ago Payment.php 1 year ago Person.php 1 year ago PhoneNumber.php 1 year ago
PhoneNumber.php
100 lines
1 <?php
2
3 namespace Faker\Provider\fi_FI;
4
5 class PhoneNumber extends \Faker\Provider\PhoneNumber
6 {
7 /**
8 * @link https://www.viestintavirasto.fi/en/internettelephone/numberingoftelecommunicationsnetworks/localcallsandtelecommunicationsareas/mapoftelecommunicationsareas.html
9 * @var array
10 */
11 protected static $landLineareaCodes = array(
12 '02',
13 '03',
14 '05',
15 '06',
16 '08',
17 '09',
18 '013',
19 '014',
20 '015',
21 '016',
22 '017',
23 '018',
24 '019',
25 );
26
27 /**
28 * @link https://www.viestintavirasto.fi/en/internettelephone/numberingoftelecommunicationsnetworks/mobilenetworks/mobilenetworkareacodes.html
29 * @var array
30 */
31 protected static $mobileNetworkAreaCodes = array(
32 '040',
33 '050',
34 '044',
35 '045',
36 );
37
38 protected static $numberFormats = array(
39 '### ####',
40 '#######',
41 );
42
43 protected static $formats = array(
44 '+358 ({{ e164MobileNetworkAreaCode }}) {{ numberFormat }}',
45 '+358 {{ e164MobileNetworkAreaCode }} {{ numberFormat }}',
46 '+358 ({{ e164landLineAreaCode }}) {{ numberFormat }}',
47 '+358 {{ e164landLineAreaCode }} {{ numberFormat }}',
48 '{{ mobileNetworkAreaCode }}{{ separator }}{{ numberFormat }}',
49 '{{ landLineAreaCode }}{{ separator }}{{ numberFormat }}',
50 );
51
52 /**
53 * @return string
54 */
55 public function landLineAreaCode()
56 {
57 return static::randomElement(static::$landLineareaCodes);
58 }
59
60 /**
61 * @return string
62 */
63 public function e164landLineAreaCode()
64 {
65 return substr(static::randomElement(static::$landLineareaCodes), 1);
66 }
67
68 /**
69 * @return string
70 */
71 public function mobileNetworkAreaCode()
72 {
73 return static::randomElement(static::$mobileNetworkAreaCodes);
74 }
75
76 /**
77 * @return string
78 */
79 public function e164MobileNetworkAreaCode()
80 {
81 return substr(static::randomElement(static::$mobileNetworkAreaCodes), 1);
82 }
83
84 /**
85 * @return string
86 */
87 public function numberFormat()
88 {
89 return static::randomElement(static::$numberFormats);
90 }
91
92 /**
93 * @return string
94 */
95 public function separator()
96 {
97 return static::randomElement(array(' ', '-'));
98 }
99 }
100