Passed
Push — master ( 2cdaae...14b6d5 )
by Jhao
02:25
created

AddressQuality   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 12
c 1
b 0
f 0
dl 0
loc 31
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A ACCEPTABLE_OPTIONS() 0 3 1
1
<?php
2
3
/**
4
 * This file is part of RussianPost SDK package.
5
 *
6
 * © Appwilio (http://appwilio.com), greabock (https://github.com/greabock), JhaoDa (https://github.com/jhaoda)
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
/** @noinspection PhpUnusedPrivateFieldInspection */
13
14
declare(strict_types=1);
15
16
namespace Appwilio\RussianPostSDK\Dispatching\Enum;
17
18
use Appwilio\RussianPostSDK\Core\Enum;
19
20
/**
21
 * Код качества нормализации адреса.
22
 *
23
 * @see https://otpravka.pochta.ru/specification#/enums-clean-address-quality
24
 *
25
 * @method static AddressQuality GOOD() Пригоден для почтовой рассылки
26
 * @method static AddressQuality ON_DEMAND() До востребования
27
 * @method static AddressQuality POSTAL_BOX() Абонентский ящик
28
 * @method static AddressQuality UNDEF_01() Не определен регион
29
 * @method static AddressQuality UNDEF_02() Не определен город или населенный пункт
30
 * @method static AddressQuality UNDEF_03() Не определена улица
31
 * @method static AddressQuality UNDEF_04() Не определен номер дома
32
 * @method static AddressQuality UNDEF_05() Не определена квартира/офис
33
 * @method static AddressQuality UNDEF_06() Не определен
34
 * @method static AddressQuality UNDEF_07() Иностранный адрес
35
 */
36
final class AddressQuality extends Enum
37
{
38
    /** Пригоден для почтовой рассылки */
39
    private const GOOD = 'GOOD';
40
    /** До востребования */
41
    private const ON_DEMAND = 'ON_DEMAND';
42
    /** Абонентский ящик */
43
    private const POSTAL_BOX = 'POSTAL_BOX';
44
    /** Не определен регион */
45
    private const UNDEF_01 = 'UNDEF_01';
46
    /** Не определен город или населенный пункт */
47
    private const UNDEF_02 = 'UNDEF_02';
48
    /** Не определена улица */
49
    private const UNDEF_03 = 'UNDEF_03';
50
    /** Не определен номер дома */
51
    private const UNDEF_04 = 'UNDEF_04';
52
    /** Не определена квартира/офис */
53
    private const UNDEF_05 = 'UNDEF_05';
54
    /** Не определен */
55
    private const UNDEF_06 = 'UNDEF_06';
56
    /** Иностранный адрес */
57
    private const UNDEF_07 = 'UNDEF_07';
58
59
    /**
60
     * Коды качества нормализации, при которых адрес считается приемлемым для доставки.
61
     *
62
     * @return array
63
     */
64 12
    public static function ACCEPTABLE_OPTIONS(): array
65
    {
66 12
        return [self::GOOD(), self::UNDEF_05(), self::ON_DEMAND(), self::POSTAL_BOX()];
67
    }
68
}
69