Total Complexity | 3 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class CommentCreatedPostsIEvent extends ApplicationInboundEvent |
||
9 | { |
||
10 | const EVENT_NAME = "COMMENT_CREATED"; |
||
11 | |||
12 | private Ulid $postId; |
||
13 | |||
14 | private array $comments; |
||
15 | |||
16 | |||
17 | /** |
||
18 | * @param array $data |
||
19 | */ |
||
20 | public function __construct(array $data) |
||
21 | { |
||
22 | parent::__construct(self::EVENT_NAME, $data); |
||
23 | $this->postId = $this->ulid('postId'); |
||
24 | $this->comments = [$this->array('comment')]; |
||
25 | } |
||
26 | |||
27 | |||
28 | /** |
||
29 | * @return Ulid|null |
||
30 | */ |
||
31 | public function getPostId(): ?Ulid |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @return array |
||
38 | */ |
||
39 | public function getComments(): array |
||
42 | } |
||
43 | |||
44 | } |