Completed
Pull Request — master (#13)
by Jhao
03:24
created

Recipient   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 61
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
eloc 13
c 1
b 0
f 0
dl 0
loc 61
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getPhone() 0 3 1
A isResult() 0 3 1
A isFraud() 0 3 1
A getFullName() 0 3 1
A isReliable() 0 3 1
A getAddress() 0 3 1
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