Total Complexity | 5 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class PostUpdatedCommentsIEvent extends ApplicationInboundEvent |
||
9 | { |
||
10 | const EVENT_NAME = "POST_UPDATED"; |
||
11 | |||
12 | private Ulid $id; |
||
13 | |||
14 | private string $title; |
||
15 | |||
16 | |||
17 | private array $tags; |
||
18 | |||
19 | private int $lastVersion; |
||
20 | |||
21 | /** |
||
22 | * @param array $data |
||
23 | */ |
||
24 | public function __construct(array $data) |
||
25 | { |
||
26 | parent::__construct(self::EVENT_NAME, $data); |
||
27 | 5 | $this->id = $this->ulid('id'); |
|
28 | $this->title = $this->string('title'); |
||
29 | 5 | $this->tags = $this->array('tags'); |
|
30 | 5 | $this->lastVersion = $this->int('lastVersion'); |
|
31 | 5 | } |
|
32 | 5 | ||
33 | 5 | ||
34 | 5 | /** |
|
35 | 5 | * @return Ulid |
|
36 | 5 | */ |
|
37 | public function getId(): Ulid |
||
40 | } |
||
41 | |||
42 | 4 | /** |
|
43 | * @return string |
||
44 | 4 | */ |
|
45 | public function getTitle(): string |
||
46 | { |
||
47 | return $this->title; |
||
48 | } |
||
49 | |||
50 | 4 | /** |
|
51 | * @return array |
||
52 | 4 | */ |
|
53 | public function getTags(): array |
||
54 | { |
||
55 | return $this->tags; |
||
56 | } |
||
57 | |||
58 | 4 | /** |
|
59 | * @return int |
||
60 | 4 | */ |
|
61 | public function getLastVersion(): int |
||
64 | } |
||
65 | } |