Completed
Push — master ( 3dc30b...6a0dc0 )
by Jhao
04:34 queued 02:01
created

Recipient::getPhone()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Appwilio\RussianPostSDK\Dispatching\Endpoints\Services\Responses;
6
7
use JMS\Serializer\Annotation AS JMS;
8
9
final class Recipient
10
{
11
    public const FRAUD = 'fraud';
12
    public const RELIABLE = 'reliable';
13
14
    /**
15
     * @JMS\SerializedName("raw-address")
16
     * @JMS\Type("string")
17
     * @var string
18
     */
19
    private $address;
20
21
    /**
22
     * @JMS\SerializedName("raw-telephone")
23
     * @JMS\Type("string")
24
     * @var string
25
     */
26
    private $phone;
27
28
    /**
29
     * @JMS\SerializedName("raw-full-name")
30
     * @JMS\Type("string")
31
     * @var string
32
     */
33
    private $fullName;
34
35
    /**
36
     * @JMS\SerializedName("unreliability")
37
     * @JMS\Type("string")
38
     * @var bool
39
     */
40
    private $result;
41
42
    public function getAddress(): string
43
    {
44
        return $this->address;
45
    }
46
47
    public function getPhone(): string
48
    {
49
        return $this->phone;
50
    }
51
52
    public function getFullName(): string
53
    {
54
        return $this->fullName;
55
    }
56
57
    public function isResult(): bool
58
    {
59
        return $this->result;
60
    }
61
62
    public function isFraud(): bool
63
    {
64
        return $this->result === self::FRAUD;
65
    }
66
67
    public function isReliable(): bool
68
    {
69
        return $this->result === self::RELIABLE;
70
    }
71
}
72