Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Pull Request — master (#1191)
by mazen
03:20
created

ItSubdivisionCode   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 137
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 129
dl 0
loc 137
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getDataSource() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of Respect/Validation.
5
 *
6
 * (c) Alexandre Gomes Gaigalas <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the "LICENSE.md"
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Respect\Validation\Rules\Locale;
15
16
use Respect\Validation\Rules\AbstractSearcher;
17
18
/**
19
 * Validates whether an input is subdivision code of Italy or not.
20
 *
21
 * ISO 3166-1 alpha-2: IT
22
 *
23
 * @see http://www.geonames.org/IT/administrative-division-italy.html
24
 *
25
 * @author Henrique Moody <[email protected]>
26
 */
27
final class ItSubdivisionCode extends AbstractSearcher
28
{
29
    private const DATA = [
30
       '21', // Piedmont
31
       '23', // Regione Autonoma Valle d'Aosta
32
       '25', // Lombardy
33
       '32', // Regione Autonoma Trentino-Alto Adige
34
       '34', // Regione del Veneto
35
       '36', // Regione Autonoma Friuli-Venezia Giulia
36
       '42', // Regione Liguria
37
       '45', // Regione Emilia-Romagna
38
       '52', // Tuscany
39
       '55', // Regione Umbria
40
       '57', // Regione Marche
41
       '62', // Regione Lazio
42
       '65', // Regione Abruzzo
43
       '67', // Regione Molise
44
       '72', // Regione Campania
45
       '75', // Regione Puglia
46
       '77', // Regione Basilicata
47
       '78', // Regione Calabria
48
       '82', // Regione Autonoma Siciliana
49
       '88', // Regione Autonoma della Sardegna
50
       'AG', // Agrigento
51
       'AL', // Alessandria
52
       'AN', // Ancona
53
       'AO', // Aosta
54
       'AP', // Ascoli Piceno
55
       'AQ', // L'Aquila
56
       'AR', // Arezzo
57
       'AT', // Asti
58
       'AV', // Avellino
59
       'BA', // Bari
60
       'BG', // Bergamo
61
       'BI', // Biella
62
       'BL', // Belluno
63
       'BN', // Benevento
64
       'BO', // Bologna
65
       'BR', // Brindisi
66
       'BS', // Brescia
67
       'BT', // Barletta-Andria-Trani
68
       'BZ', // Bolzano
69
       'CA', // Cagliari
70
       'CB', // Campobasso
71
       'CE', // Caserta
72
       'CH', // Chieti
73
       'CL', // Caltanissetta
74
       'CN', // Cuneo
75
       'CO', // Como
76
       'CR', // Cremona
77
       'CS', // Cosenza
78
       'CT', // Catania
79
       'CZ', // Catanzaro
80
       'EN', // Enna
81
       'FC', // Forlì-Cesena
82
       'FE', // Ferrara
83
       'FG', // Foggia
84
       'FI', // Firenze
85
       'FM', // Fermo
86
       'FR', // Frosinone
87
       'GE', // Genova
88
       'GO', // Gorizia
89
       'GR', // Grosseto
90
       'IM', // Imperia
91
       'IS', // Isernia
92
       'KR', // Crotone
93
       'LC', // Lecco
94
       'LE', // Lecce
95
       'LI', // Livorno
96
       'LO', // Lodi
97
       'LT', // Latina
98
       'LU', // Lucca
99
       'MB', // Monza e Brianza
100
       'MC', // Macerata
101
       'ME', // Messina
102
       'MI', // Milano
103
       'MN', // Mantova
104
       'MO', // Modena
105
       'MS', // Massa-Carrara
106
       'MT', // Matera
107
       'NA', // Napoli
108
       'NO', // Novara
109
       'NU', // Nuoro
110
       'OR', // Oristano
111
       'PA', // Palermo
112
       'PC', // Piacenza
113
       'PD', // Padova
114
       'PE', // Pescara
115
       'PG', // Perugia
116
       'PI', // Pisa
117
       'PN', // Pordenone
118
       'PO', // Prato
119
       'PR', // Parma
120
       'PT', // Pistoia
121
       'PU', // Pesaro e Urbino
122
       'PV', // Pavia
123
       'PZ', // Potenza
124
       'RA', // Ravenna
125
       'RC', // Reggio Calabria
126
       'RE', // Reggio Emilia
127
       'RG', // Ragusa
128
       'RI', // Rieti
129
       'RM', // Roma
130
       'RN', // Rimini
131
       'RO', // Rovigo
132
       'SA', // Salerno
133
       'SI', // Siena
134
       'SO', // Sondrio
135
       'SP', // La Spezia
136
       'SR', // Siracusa
137
       'SS', // Sassari
138
       'SV', // Savona
139
       'TA', // Taranto
140
       'TE', // Teramo
141
       'TN', // Trento
142
       'TO', // Torino
143
       'TP', // Trapani
144
       'TR', // Terni
145
       'TS', // Trieste
146
       'TV', // Treviso
147
       'UD', // Udine
148
       'VA', // Varese
149
       'VB', // Verbano-Cusio-Ossola
150
       'VC', // Vercelli
151
       'VE', // Venezia
152
       'VI', // Vicenza
153
       'VR', // Verona
154
       'VT', // Viterbo
155
       'VV', // Vibo Valentia
156
    ];
157
158
    /**
159
     * {@inheritdoc}
160
     */
161
    protected function getDataSource(): array
162
    {
163
        return self::DATA;
164
    }
165
}
166