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

ThSubdivisionCode::getDataSource()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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 Thailand or not.
20
 *
21
 * ISO 3166-1 alpha-2: TH
22
 *
23
 * @see http://www.geonames.org/TH/administrative-division-thailand.html
24
 *
25
 * @author Henrique Moody <[email protected]>
26
 */
27
final class ThSubdivisionCode extends AbstractSearcher
28
{
29
    private const DATA = [
30
        '10', // Bangkok
31
        '11', // Samut Prakan
32
        '12', // Nonthaburi
33
        '13', // Pathum Thani
34
        '14', // Phra Nakhon Si Ayutthaya
35
        '15', // Ang Thong
36
        '16', // Lop Buri
37
        '17', // Sing Buri
38
        '18', // Chai Nat
39
        '19', // Saraburi
40
        '20', // Chon Buri
41
        '21', // Rayong
42
        '22', // Chanthaburi
43
        '23', // Trat
44
        '24', // Chachoengsao
45
        '25', // Prachin Buri
46
        '26', // Nakhon Nayok
47
        '27', // Sa Kaeo
48
        '30', // Nakhon Ratchasima
49
        '31', // Buri Ram
50
        '32', // Surin
51
        '33', // Si Sa Ket
52
        '34', // Ubon Ratchathani
53
        '35', // Yasothon
54
        '36', // Chaiyaphum
55
        '37', // Amnat Charoen
56
        '38', // Bueng Kan
57
        '39', // Nong Bua Lam Phu
58
        '40', // Khon Kaen
59
        '41', // Udon Thani
60
        '42', // Loei
61
        '43', // Nong Khai
62
        '44', // Maha Sarakham
63
        '45', // Roi Et
64
        '46', // Kalasin
65
        '47', // Sakon Nakhon
66
        '48', // Nakhon Phanom
67
        '49', // Mukdahan
68
        '50', // Chiang Mai
69
        '51', // Lamphun
70
        '52', // Lampang
71
        '53', // Uttaradit
72
        '54', // Phrae
73
        '55', // Nan
74
        '56', // Phayao
75
        '57', // Chiang Rai
76
        '58', // Mae Hong Son
77
        '60', // Nakhon Sawan
78
        '61', // Uthai Thani
79
        '62', // Kamphaeng Phet
80
        '63', // Tak
81
        '64', // Sukhothai
82
        '65', // Phitsanulok
83
        '66', // Phichit
84
        '67', // Phetchabun
85
        '70', // Ratchaburi
86
        '71', // Kanchanaburi
87
        '72', // Suphanburi
88
        '73', // Nakhon Pathom
89
        '74', // Samut Sakhon
90
        '75', // Samut Songkhram
91
        '76', // Phetchaburi
92
        '77', // Prachuap Khiri Khan
93
        '80', // Nakhon Si Thammarat
94
        '81', // Krabi
95
        '82', // Phang Nga
96
        '83', // Phuket
97
        '84', // Surat Thani
98
        '85', // Ranong
99
        '86', // Chumpon
100
        '90', // Songkhla
101
        '91', // Satun
102
        '92', // Trang
103
        '93', // Phattalung
104
        '94', // Pattani
105
        '95', // Yala
106
        '96', // Narathiwat
107
        'S', // Pattaya
108
    ];
109
    
110
    /**
111
     * {@inheritdoc}
112
     */
113
    protected function getDataSource(): array
114
    {
115
        return self::DATA;
116
    }
117
}
118