Test Setup Failed
Push — main ( abdcb9...2e5f68 )
by Slawomir
04:37
created

CommentsCountUpdatedOEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 9
rs 10
1
<?php
2
3
namespace App\Modules\Comments\Domain\Event\Outbound;
4
5
use App\Infrastructure\Events\ApplicationOutboundEvent;
6
use Symfony\Component\Uid\Ulid;
7
8
class CommentsCountUpdatedOEvent extends ApplicationOutboundEvent
9
{
10
    const EVENT_NAME = "COMMENTS_COUNT_UPDATED";
11
12
    /**
13
     * @param Ulid $postId
14
     * @param int $commentsCount
15
     */
16
    public function __construct(
17
        Ulid $postId,
18
        int  $commentsCount
19
    )
20
    {
21
        parent::__construct(self::EVENT_NAME,
22
            [
23
                'postId' => $postId,
24
                'commentsCount' => $commentsCount,
25
            ]
26
        );
27
    }
28
}