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

IdSubdivisionCode   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getDataSource() 0 44 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 Indonesia or not.
20
 *
21
 * ISO 3166-1 alpha-2: ID
22
 *
23
 * @see http://www.geonames.org/ID/administrative-division-indonesia.html
24
 *
25
 * @author Henrique Moody <[email protected]>
26
 */
27
final class IdSubdivisionCode extends AbstractSearcher
28
{
29
    /**
30
     * {@inheritdoc}
31
     */
32
    protected function getDataSource(): array
33
    {
34
        return [
35
           'AC', // Aceh
36
           'BA', // Bali
37
           'BB', // Bangka-Belitung
38
           'BE', // Bengkulu
39
           'BT', // Banten
40
           'GO', // Gorontalo
41
           'JA', // Jambi
42
           'JB', // Jawa Barat
43
           'JI', // Jawa Timur
44
           'JK', // Jakarta Raya
45
           'JT', // Jawa Tengah
46
           'JW', // Java
47
           'KA', // Kalimantan
48
           'KB', // Kalimantan Barat
49
           'KI', // Kalimantan Timur
50
           'KR', // Kepulauan Riau
51
           'KS', // Kalimantan Selatan
52
           'KT', // Kalimantan Tengah
53
           'KU', // Kalimantan Utara
54
           'LA', // Lampung
55
           'MA', // Maluku
56
           'ML', // Maluku
57
           'MU', // Maluku Utara
58
           'NB', // Nusa Tenggara Barat
59
           'NT', // Nusa Tenggara Timur
60
           'NU', // Nusa Tenggara
61
           'PA', // Papua
62
           'PB', // Papua Barat
63
           'PP', // Papua
64
           'RI', // Riau
65
           'SA', // Sulawesi Utara
66
           'SB', // Sumatera Barat
67
           'SG', // Sulawesi Tenggara
68
           'SL', // Sulawesi
69
           'SM', // Sumatera
70
           'SN', // Sulawesi Selatan
71
           'SR', // Sulawesi Barat
72
           'SS', // Sumatera Selatan
73
           'ST', // Sulawesi Tengah
74
           'SU', // Sumatera Utara
75
           'YO', // Yogyakarta
76
       ];
77
    }
78
}
79