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

VnSubdivisionCode::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 Vietnam or not.
20
 *
21
 * ISO 3166-1 alpha-2: VN
22
 *
23
 * @see http://www.geonames.org/VN/administrative-division-vietnam.html
24
 *
25
 * @author Henrique Moody <[email protected]>
26
 */
27
final class VnSubdivisionCode extends AbstractSearcher
28
{
29
    private const DATA = [
30
        '01', // Lai Chau
31
        '02', // Lao Cai
32
        '03', // Ha Giang
33
        '04', // Cao Bang
34
        '05', // Son La
35
        '06', // Yen Bai
36
        '07', // Tuyen Quang
37
        '09', // Lang Son
38
        '13', // Quang Ninh
39
        '14', // Hoa Binh
40
        '18', // Ninh Binh
41
        '20', // Thai Binh
42
        '21', // Thanh Hoa
43
        '22', // Nghe An
44
        '23', // Ha Tinh
45
        '24', // Quang Binh
46
        '25', // Quang Tri
47
        '26', // Thua Thien-Hue
48
        '27', // Quang Nam
49
        '28', // Kon Tum
50
        '29', // Quang Ngai
51
        '30', // Gia Lai
52
        '31', // Binh Dinh
53
        '32', // Phu Yen
54
        '33', // Dak Lak
55
        '34', // Khanh Hoa
56
        '35', // Lam Dong
57
        '36', // Ninh Thuan
58
        '37', // Tay Ninh
59
        '39', // Dong Nai
60
        '40', // Binh Thuan
61
        '41', // Long An
62
        '43', // Ba Ria-Vung Tau
63
        '44', // An Giang
64
        '45', // Dong Thap
65
        '46', // Tien Giang
66
        '47', // Kien Giang
67
        '49', // Vinh Long
68
        '50', // Ben Tre
69
        '51', // Tra Vinh
70
        '52', // Soc Trang
71
        '53', // Bac Can
72
        '54', // Bac Giang
73
        '55', // Bac Lieu
74
        '56', // Bac Ninh
75
        '57', // Binh Duong
76
        '58', // Binh Phuoc
77
        '59', // Ca Mau
78
        '61', // Hai Duong
79
        '63', // Ha Nam
80
        '66', // Hung Yen
81
        '67', // Nam Dinh
82
        '68', // Phu Tho
83
        '69', // Thai Nguyen
84
        '70', // Vinh Phuc
85
        '71', // Dien Bien
86
        '72', // Dak Nong
87
        '73', // Hau Giang
88
        'CT', // Can Tho
89
        'DN', // Da Nang
90
        'HN', // Ha Noi
91
        'HP', // Hai Phong
92
        'SG', // Ho Chi Minh
93
    ];
94
    
95
    /**
96
     * {@inheritdoc}
97
     */
98
    protected function getDataSource(): array
99
    {
100
        return self::DATA;
101
    }
102
}
103