1 | <?php |
||
6 | class NotificationId |
||
7 | { |
||
8 | /** |
||
9 | * @var int |
||
10 | */ |
||
11 | private $id; |
||
12 | |||
13 | /** |
||
14 | * @param int $id |
||
15 | */ |
||
16 | 6 | public function __construct(int $id) |
|
17 | { |
||
18 | 6 | $this->id = $id; |
|
19 | 6 | } |
|
20 | |||
21 | /** |
||
22 | * @return int |
||
23 | */ |
||
24 | 6 | public function id(): int |
|
25 | { |
||
26 | 6 | return $this->id; |
|
27 | } |
||
28 | |||
29 | /** |
||
30 | * @param NotificationId $other |
||
31 | * @return bool |
||
32 | */ |
||
33 | 1 | public function equals(NotificationId $other): bool |
|
34 | { |
||
35 | 1 | return $this->id() === $other->id(); |
|
36 | } |
||
37 | |||
38 | /** |
||
39 | * @return string |
||
40 | */ |
||
41 | 3 | public function __toString(): string |
|
45 | } |
||
46 |