Completed
Push — master ( 2632c0...41a50c )
by Dmitry
01:33
created

AreaCode::getAreaCodes()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 196
Code Lines 194

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 194
c 1
b 0
f 0
dl 0
loc 196
rs 8
cc 1
nc 1
nop 0

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php
2
3
declare(strict_types=1);
4
5
namespace Promopult\TikTokMarketingApi\Appendix;
6
7
final class AreaCode
8
{
9
    public static function getAreaCodes(): array
10
    {
11
        return [
12
            ['Andorra', 'AD'],
13
            ['United Arab Emirates', 'AE'],
14
            ['Afghanistan', 'AF'],
15
            ['Antigua and Barbuda', 'AG'],
16
            ['Albania', 'AL'],
17
            ['Armenia', 'AM'],
18
            ['Angola', 'AO'],
19
            ['Argentina', 'AR'],
20
            ['Austria', 'AT'],
21
            ['Australia', 'AU'],
22
            ['Azerbaijan', 'AZ'],
23
            ['Bosnia & Herzegovina', 'BA'],
24
            ['Barbados', 'BB'],
25
            ['Bangladesh', 'BD'],
26
            ['Belgium', 'BE'],
27
            ['Burkina Faso', 'BF'],
28
            ['Bulgaria', 'BG'],
29
            ['Bahrain', 'BH'],
30
            ['Burundi', 'BI'],
31
            ['Benin', 'BJ'],
32
            ['Brunei', 'BN'],
33
            ['Bolivia', 'BO'],
34
            ['Brazil', 'BR'],
35
            ['Commonwealth of the Bahamas', 'BS'],
36
            ['Bhutan', 'BT'],
37
            ['Botswana', 'BW'],
38
            ['Belarus', 'BY'],
39
            ['Belize', 'BZ'],
40
            ['Canada', 'CA'],
41
            ['Switzerland', 'CH'],
42
            ['Cote D\'Ivoire', 'CI'],
43
            ['Chile', 'CL'],
44
            ['Cameroon', 'CM'],
45
            ['China', 'CN'],
46
            ['Colombia', 'CO'],
47
            ['Costa Rica', 'CR'],
48
            ['Cape Verde', 'CV'],
49
            ['Cyprus', 'CY'],
50
            ['Czech Republic', 'CZ'],
51
            ['Germany', 'DE'],
52
            ['Djibouti', 'DJ'],
53
            ['Denmark', 'DK'],
54
            ['Dominica', 'DM'],
55
            ['Dominican Republic', 'DO'],
56
            ['Algeria', 'DZ'],
57
            ['Ecuador', 'EC'],
58
            ['Estonia', 'EE'],
59
            ['Egypt', 'EG'],
60
            ['Eritrea', 'ER'],
61
            ['Spain', 'ES'],
62
            ['Ethiopia', 'ET'],
63
            ['Finland', 'FI'],
64
            ['Fiji', 'FJ'],
65
            ['Micronesia', 'FM'],
66
            ['France', 'FR'],
67
            ['Gabon', 'GA'],
68
            ['United Kingdom', 'GB'],
69
            ['Grenada', 'GD'],
70
            ['Georgia', 'GE'],
71
            ['Ghana', 'GH'],
72
            ['Gibraltar', 'GI'],
73
            ['Gambia', 'GM'],
74
            ['Guinea', 'GN'],
75
            ['Equatorial Guinea', 'GQ'],
76
            ['Greece', 'GR'],
77
            ['Guatemala', 'GT'],
78
            ['Guinea-Bissau', 'GW'],
79
            ['Guyana', 'GY'],
80
            ['Hong Kong', 'HK'],
81
            ['Honduras', 'HN'],
82
            ['Croatia', 'HR'],
83
            ['Haiti', 'HT'],
84
            ['Hungary', 'HU'],
85
            ['Indonesia', 'ID'],
86
            ['Ireland', 'IE'],
87
            ['Israel', 'IL'],
88
            ['India', 'IN'],
89
            ['Iraq', 'IQ'],
90
            ['Iceland', 'IS'],
91
            ['Italy', 'IT'],
92
            ['Jamaica', 'JM'],
93
            ['Jordan', 'JO'],
94
            ['Japan', 'JP'],
95
            ['Kenya', 'KE'],
96
            ['Kyrgyzstan', 'KG'],
97
            ['Cambodia', 'KH'],
98
            ['Kiribati', 'KI'],
99
            ['Comoros', 'KM'],
100
            ['Saint Christopher and Nevis', 'KN'],
101
            ['Korea, South', 'KR'],
102
            ['Kuwait', 'KW'],
103
            ['Cayman Islands', 'KY'],
104
            ['Kazakhstan', 'KZ'],
105
            ['Laos', 'LA'],
106
            ['Lebanon', 'LB'],
107
            ['Saint Lucia', 'LC'],
108
            ['Liechtenstein', 'LI'],
109
            ['Sri Lanka', 'LK'],
110
            ['Liberia', 'LR'],
111
            ['Lesotho', 'LS'],
112
            ['Lithuania', 'LT'],
113
            ['Luxembourg', 'LU'],
114
            ['Latvia', 'LV'],
115
            ['Libya', 'LY'],
116
            ['Morocco', 'MA'],
117
            ['Monaco', 'MC'],
118
            ['Moldova', 'MD'],
119
            ['Montenegro', 'ME'],
120
            ['Madagascar', 'MG'],
121
            ['Marshall Islands', 'MH'],
122
            ['Macedonia', 'MK'],
123
            ['Mali', 'ML'],
124
            ['Myanmar', 'MM'],
125
            ['Mongolia', 'MN'],
126
            ['Macau', 'MO'],
127
            ['Mauritania', 'MR'],
128
            ['Malta', 'MT'],
129
            ['Mauritius', 'MU'],
130
            ['Maldives', 'MV'],
131
            ['Malawi', 'MW'],
132
            ['Mexico', 'MX'],
133
            ['Malaysia', 'MY'],
134
            ['Mozambique', 'MZ'],
135
            ['Namibia', 'NA'],
136
            ['Niger', 'NE'],
137
            ['Nigeria', 'NG'],
138
            ['Nicaragua', 'NI'],
139
            ['Netherlands', 'NL'],
140
            ['Norway', 'NO'],
141
            ['Nepal', 'NP'],
142
            ['Nauru', 'NR'],
143
            ['New Zealand', 'NZ'],
144
            ['Oman', 'OM'],
145
            ['Panama', 'PA'],
146
            ['Peru', 'PE'],
147
            ['Papua New Guinea', 'PG'],
148
            ['Philippines', 'PH'],
149
            ['Pakistan', 'PK'],
150
            ['Poland', 'PL'],
151
            ['Puerto Rico', 'PR'],
152
            ['Palestine', 'PS'],
153
            ['Portugal', 'PT'],
154
            ['Palau', 'PW'],
155
            ['Paraguay', 'PY'],
156
            ['Qatar', 'QA'],
157
            ['Romania', 'RO'],
158
            ['Serbia', 'RS'],
159
            ['Russia', 'RU'],
160
            ['Rwanda', 'RW'],
161
            ['Saudi Arabia', 'SA'],
162
            ['Solomon Islands', 'SB'],
163
            ['Seychelles', 'SC'],
164
            ['Sweden', 'SE'],
165
            ['Singapore', 'SG'],
166
            ['Slovenia', 'SI'],
167
            ['Slovakia', 'SK'],
168
            ['Sierra Leone', 'SL'],
169
            ['San Marino', 'SM'],
170
            ['Senegal', 'SN'],
171
            ['Somali', 'SO'],
172
            ['Suriname', 'SR'],
173
            ['Sao Tomé and Príncipe', 'ST'],
174
            ['El Salvador', 'SV'],
175
            ['Swaziland', 'SZ'],
176
            ['Chad', 'TD'],
177
            ['Togo', 'TG'],
178
            ['Thailand', 'TH'],
179
            ['Tajikistan', 'TJ'],
180
            ['Timor-Leste', 'TL'],
181
            ['Turkmenistan', 'TM'],
182
            ['Tunisia', 'TN'],
183
            ['Tonga', 'TO'],
184
            ['Turkey', 'TR'],
185
            ['Trinidad and Tobago', 'TT'],
186
            ['Tuvalu', 'TV'],
187
            ['Taiwan', 'TW'],
188
            ['Tanzania', 'TZ'],
189
            ['Ukraine', 'UA'],
190
            ['Uganda', 'UG'],
191
            ['United States', 'US'],
192
            ['Uruguay', 'UY'],
193
            ['Uzbekistan', 'UZ'],
194
            ['Vatican City', 'VA'],
195
            ['Saint Vincent and The Grenadines', 'VC'],
196
            ['Venezuela', 'VE'],
197
            ['British Virgin Islands', 'VG'],
198
            ['Vietnam', 'VN'],
199
            ['Vanuatu', 'VU'],
200
            ['Samoa', 'WS'],
201
            ['Yemen', 'YE'],
202
            ['South Africa', 'ZA'],
203
            ['Zambia', 'ZM'],
204
            ['Zimbabwe', 'ZW'],
205
        ];
206
    }
207
}
208