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

CommentsCountUpdatedOEvent   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 17
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
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
}