Passed
Push — master ( 9cc4e5...20c317 )
by
unknown
55s queued 13s
created

FacadeDocListV2ItemResponse::getReceivedAt()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Lamoda\IsmpClient\V3\Dto;
6
7
use Symfony\Component\Serializer\Annotation\SerializedName;
8
9
final class FacadeDocListV2ItemResponse
10
{
11
    /**
12
     * @var string
13
     */
14
    private $number;
15
    /**
16
     * @var string
17
     * @SerializedName("docDate")
18
     */
19
    private $docDate;
20
    /**
21
     * @var string
22
     * @SerializedName("receivedAt")
23
     */
24
    private $receivedAt;
25
    /**
26
     * @var string|null
27
     */
28
    private $type;
29
    /**
30
     * @var string|null
31
     */
32
    private $status;
33
    /**
34
     * @var string|null
35
     * @SerializedName("senderName")
36
     */
37
    private $senderName;
38
39
    public function __construct(
40
        string $number,
41
        string $docDate,
42
        string $receivedAt
43
    ) {
44
        $this->number = $number;
45
        $this->docDate = $docDate;
46
        $this->receivedAt = $receivedAt;
47
    }
48
49
    public function getNumber(): string
50
    {
51
        return $this->number;
52
    }
53
54
    public function getDocDate(): string
55
    {
56
        return $this->docDate;
57
    }
58
59
    /**
60
     * @throws \Exception
61
     */
62
    public function getDocDateDateTime(): \DateTimeImmutable
63
    {
64
        return new \DateTimeImmutable($this->docDate);
65
    }
66
67
    public function getReceivedAt(): string
68
    {
69
        return $this->receivedAt;
70
    }
71
72
    /**
73
     * @throws \Exception
74
     */
75
    public function getReceivedAtDateTime(): \DateTimeImmutable
76
    {
77
        return new \DateTimeImmutable($this->receivedAt);
78
    }
79
80
    public function setType(?string $type): self
81
    {
82
        $this->type = $type;
83
84
        return $this;
85
    }
86
87
    public function setStatus(?string $status): self
88
    {
89
        $this->status = $status;
90
91
        return $this;
92
    }
93
94
    public function setSenderName(?string $senderName): self
95
    {
96
        $this->senderName = $senderName;
97
98
        return $this;
99
    }
100
101
    public function getType(): ?string
102
    {
103
        return $this->type;
104
    }
105
106
    public function getStatus(): ?string
107
    {
108
        return $this->status;
109
    }
110
111
    public function getSenderName(): ?string
112
    {
113
        return $this->senderName;
114
    }
115
}
116