1 | <?php |
||
11 | class Death |
||
12 | { |
||
13 | use ImmutableTrait, SerializableTrait; |
||
14 | |||
15 | /** |
||
16 | * @var Carbon |
||
17 | */ |
||
18 | private $date; |
||
19 | |||
20 | /** |
||
21 | * @var int |
||
22 | */ |
||
23 | private $level; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | private $reason; |
||
29 | |||
30 | /** |
||
31 | * @var Collection |
||
32 | */ |
||
33 | private $involved; |
||
34 | |||
35 | /** |
||
36 | * Death constructor. |
||
37 | * @param Carbon $date |
||
38 | * @param int $level |
||
39 | * @param string $reason |
||
40 | * @param array $involved |
||
41 | * @throws ImmutableException |
||
42 | */ |
||
43 | public function __construct(Carbon $date, int $level, string $reason, Collection $involved) |
||
52 | |||
53 | /** |
||
54 | * @return Carbon |
||
55 | */ |
||
56 | public function getDate(): Carbon |
||
60 | |||
61 | /** |
||
62 | * @return int |
||
63 | */ |
||
64 | public function getLevel(): int |
||
68 | |||
69 | /** |
||
70 | * @return string |
||
71 | */ |
||
72 | public function getReason(): string |
||
76 | |||
77 | /** |
||
78 | * @return array |
||
79 | */ |
||
80 | public function getInvolved(): Collection |
||
84 | } |
||
85 |