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 (#1034)
by Henrique
02:29
created

NgSubdivisionCode   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 45
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getDataSource() 0 40 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 Nigeria or not.
20
 *
21
 * ISO 3166-1 alpha-2: NG
22
 *
23
 * @see http://www.geonames.org/NG/administrative-division-nigeria.html
24
 *
25
 * @author Henrique Moody <[email protected]>
26
 */
27
final class NgSubdivisionCode extends AbstractSearcher
28
{
29
    /**
30
     * {@inheritdoc}
31
     */
32
    protected function getDataSource(): array
33
    {
34
        return [
35
           'AB', // Abia
36
           'AD', // Adamawa
37
           'AK', // Akwa Ibom
38
           'AN', // Anambra
39
           'BA', // Bauchi
40
           'BE', // Benue
41
           'BO', // Borno
42
           'BY', // Bayelsa
43
           'CR', // Cross River
44
           'DE', // Delta
45
           'EB', // Ebonyi
46
           'ED', // Edo
47
           'EK', // Ekiti
48
           'EN', // Enugu
49
           'FC', // Federal Capital Territory
50
           'GO', // Gombe
51
           'IM', // Imo
52
           'JI', // Jigawa
53
           'KD', // Kaduna
54
           'KE', // Kebbi
55
           'KN', // Kano
56
           'KO', // Kogi
57
           'KT', // Katsina
58
           'KW', // Kwara
59
           'LA', // Lagos
60
           'NA', // Nassarawa
61
           'NI', // Niger
62
           'OG', // Ogun
63
           'ON', // Ondo
64
           'OS', // Osun
65
           'OY', // Oyo
66
           'PL', // Plateau
67
           'RI', // Rivers
68
           'SO', // Sokoto
69
           'TA', // Taraba
70
           'YO', // Yobe
71
           'ZA', // Zamfara
72
       ];
73
    }
74
}
75