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

UsSubdivisionCode::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 United States or not.
20
 *
21
 * ISO 3166-1 alpha-2: US
22
 *
23
 * @see http://www.geonames.org/US/administrative-division-united-states.html
24
 *
25
 * @author Henrique Moody <[email protected]>
26
 */
27
final class UsSubdivisionCode extends AbstractSearcher
28
{
29
    private const DATA = [
30
        'AK', // Alaska
31
        'AL', // Alabama
32
        'AR', // Arkansas
33
        'AS', // American Samoa
34
        'AZ', // Arizona
35
        'CA', // California
36
        'CO', // Colorado
37
        'CT', // Connecticut
38
        'DC', // District of Columbia
39
        'DE', // Delaware
40
        'FL', // Florida
41
        'GA', // Georgia
42
        'GU', // Guam
43
        'HI', // Hawaii
44
        'IA', // Iowa
45
        'ID', // Idaho
46
        'IL', // Illinois
47
        'IN', // Indiana
48
        'KS', // Kansas
49
        'KY', // Kentucky
50
        'LA', // Louisiana
51
        'MA', // Massachusetts
52
        'MD', // Maryland
53
        'ME', // Maine
54
        'MI', // Michigan
55
        'MN', // Minnesota
56
        'MO', // Missouri
57
        'MP', // Northern Mariana Islands
58
        'MS', // Mississippi
59
        'MT', // Montana
60
        'NC', // North Carolina
61
        'ND', // North Dakota
62
        'NE', // Nebraska
63
        'NH', // New Hampshire
64
        'NJ', // New Jersey
65
        'NM', // New Mexico
66
        'NV', // Nevada
67
        'NY', // New York
68
        'OH', // Ohio
69
        'OK', // Oklahoma
70
        'OR', // Oregon
71
        'PA', // Pennsylvania
72
        'PR', // Puerto Rico
73
        'RI', // Rhode Island
74
        'SC', // South Carolina
75
        'SD', // South Dakota
76
        'TN', // Tennessee
77
        'TX', // Texas
78
        'UM', // U.S. Minor Outlying Islands
79
        'UT', // Utah
80
        'VA', // Virginia
81
        'VI', // Virgin Islands of the U.S.
82
        'VT', // Vermont
83
        'WA', // Washington
84
        'WI', // Wisconsin
85
        'WV', // West Virginia
86
        'WY', // Wyoming
87
    ];
88
    
89
    /**
90
     * {@inheritdoc}
91
     */
92
    protected function getDataSource(): array
93
    {
94
        return self::DATA;
95
    }
96
}
97