Total Complexity | 9 |
Total Lines | 100 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
9 | final class Event |
||
10 | { |
||
11 | /** |
||
12 | * @var DateTimeImmutable |
||
13 | */ |
||
14 | private $startTime; |
||
15 | |||
16 | /** |
||
17 | * @var DateTimeImmutable |
||
18 | */ |
||
19 | private $endTime; |
||
20 | |||
21 | /** |
||
22 | * @var DateTimeImmutable |
||
23 | */ |
||
24 | private $urlsExpireTime; |
||
25 | |||
26 | /** |
||
27 | * @var bool |
||
28 | */ |
||
29 | private $sound; |
||
30 | |||
31 | /** |
||
32 | * @var bool |
||
33 | */ |
||
34 | private $motion; |
||
35 | |||
36 | /** |
||
37 | * @var bool |
||
38 | */ |
||
39 | private $person; |
||
40 | |||
41 | /** |
||
42 | * @var string |
||
43 | */ |
||
44 | private $webUrl; |
||
45 | |||
46 | /** |
||
47 | * @var string |
||
48 | */ |
||
49 | private $appUrl; |
||
50 | |||
51 | 1 | public function __construct( |
|
52 | DateTimeImmutable $startTime, |
||
53 | DateTimeImmutable $endTime, |
||
54 | DateTimeImmutable $urlsExpireTime, |
||
55 | bool $sound, |
||
56 | bool $motion, |
||
57 | bool $person, |
||
58 | string $webUrl, |
||
59 | string $appUrl |
||
60 | ) { |
||
61 | 1 | $this->startTime = $startTime; |
|
62 | 1 | $this->endTime = $endTime; |
|
63 | 1 | $this->urlsExpireTime = $urlsExpireTime; |
|
64 | 1 | $this->sound = $sound; |
|
65 | 1 | $this->motion = $motion; |
|
66 | 1 | $this->person = $person; |
|
67 | 1 | $this->webUrl = $webUrl; |
|
68 | 1 | $this->appUrl = $appUrl; |
|
69 | 1 | } |
|
70 | |||
71 | 1 | public function getStartTime(): DateTimeImmutable |
|
72 | { |
||
73 | 1 | return $this->startTime; |
|
74 | } |
||
75 | |||
76 | 1 | public function getEndTime(): DateTimeImmutable |
|
77 | { |
||
78 | 1 | return $this->endTime; |
|
79 | } |
||
80 | |||
81 | 1 | public function getUrlsExpireTime(): DateTimeImmutable |
|
82 | { |
||
83 | 1 | return $this->urlsExpireTime; |
|
84 | } |
||
85 | |||
86 | 1 | public function hasSound(): bool |
|
87 | { |
||
88 | 1 | return $this->sound; |
|
89 | } |
||
90 | |||
91 | 1 | public function hasMotion(): bool |
|
92 | { |
||
93 | 1 | return $this->motion; |
|
94 | } |
||
95 | |||
96 | 1 | public function hasPerson(): bool |
|
97 | { |
||
98 | 1 | return $this->person; |
|
99 | } |
||
100 | |||
101 | 1 | public function getWebUrl(): string |
|
102 | { |
||
103 | 1 | return $this->webUrl; |
|
104 | } |
||
105 | |||
106 | 1 | public function getAppUrl(): string |
|
109 | } |
||
110 | } |
||
111 |