Total Complexity | 4 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class CommentsBaselinedPostsIEvent extends ApplicationInboundEvent |
||
9 | { |
||
10 | const EVENT_NAME = "COMMENTS_BASELINED"; |
||
11 | |||
12 | private Ulid $postId; |
||
13 | |||
14 | private array $comments; |
||
15 | |||
16 | /** |
||
17 | * @param array $data |
||
18 | */ |
||
19 | 2 | public function __construct(array $data) |
|
20 | { |
||
21 | 2 | parent::__construct($data); |
|
22 | 2 | $this->postId = $this->ulid('postId'); |
|
23 | 2 | $this->comments = $this->array('comments'); |
|
24 | 2 | } |
|
25 | |||
26 | /** |
||
27 | * @return Ulid|null |
||
28 | */ |
||
29 | 1 | public function getPostId(): ?Ulid |
|
30 | { |
||
31 | 1 | return $this->postId; |
|
32 | } |
||
33 | |||
34 | /** |
||
35 | * @return array |
||
36 | */ |
||
37 | 1 | public function getComments(): array |
|
40 | } |
||
41 | |||
42 | /** |
||
43 | 1 | * @return string |
|
44 | */ |
||
45 | public static function getName(): string |
||
51 | } |