Total Complexity | 6 |
Total Lines | 62 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class PostBaselinedCommentsIEvent extends ApplicationInboundEvent |
||
9 | { |
||
10 | const EVENT_NAME = "POST_BASELINED"; |
||
11 | |||
12 | private Ulid $id; |
||
13 | |||
14 | private string $title; |
||
15 | |||
16 | private array $tags; |
||
17 | |||
18 | private int $version; |
||
19 | |||
20 | /** |
||
21 | * @param array $data |
||
22 | */ |
||
23 | public function __construct(array $data) |
||
24 | { |
||
25 | parent::__construct($data); |
||
26 | $this->id = $this->ulid('id'); |
||
27 | $this->title = $this->string('title'); |
||
28 | $this->tags = $this->array('tags'); |
||
29 | $this->version = $this->int('version'); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @return Ulid |
||
34 | */ |
||
35 | public function getId(): Ulid |
||
36 | { |
||
37 | return $this->id; |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @return string |
||
42 | */ |
||
43 | public function getTitle(): string |
||
44 | { |
||
45 | return $this->title; |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @return array |
||
50 | */ |
||
51 | public function getTags(): array |
||
52 | { |
||
53 | return $this->tags; |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * @return int |
||
58 | */ |
||
59 | public function getVersion(): int |
||
62 | } |
||
63 | |||
64 | /** |
||
65 | * @return string |
||
66 | */ |
||
67 | public static function getName(): string |
||
70 | } |
||
71 | |||
72 | } |