Passed
Push — master ( 514e19...f398a9 )
by Jhao
02:15
created

NormalizedFio::getMiddleName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * This file is part of RussianPost SDK package.
5
 *
6
 * © Appwilio (http://appwilio.com), 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
declare(strict_types=1);
13
14
namespace Appwilio\RussianPostSDK\Dispatching\Endpoints\Services\Entities;
15
16
use Appwilio\RussianPostSDK\Dispatching\DataAware;
17
use Appwilio\RussianPostSDK\Dispatching\Contracts\Arrayable;
18
19
final class NormalizedFio implements Arrayable
20
{
21
    use DataAware;
22
23
    /**
24
     * Коды качества нормализации ФИО.
25
     *
26
     * @see https://otpravka.pochta.ru/specification#/enums-clean-fio-quality
27
     */
28
    public const QUALITY_EDITED = 'EDITED';
29
    public const QUALITY_NOT_SURE = 'NOT_SURE';
30
    public const QUALITY_CONFIRMED_MANUALLY = 'CONFIRMED_MANUALLY';
31
32 1
    public function getId(): string
33
    {
34 1
        return $this->get('id');
35
    }
36
37 1
    public function getFirstName(): ?string
38
    {
39 1
        return $this->get('name');
40
    }
41
42 1
    public function getMiddleName(): ?string
43
    {
44 1
        return $this->get('middle-name');
45
    }
46
47 1
    public function getLastName(): ?string
48
    {
49 1
        return $this->get('surname');
50
    }
51
52 1
    public function getOriginalFio(): string
53
    {
54 1
        return $this->get('original-fio');
55
    }
56
57 1
    public function getQualityCode(): string
58
    {
59 1
        return $this->get('quality-code');
60
    }
61
}
62