BoardCreatedEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 6
dl 0
loc 10
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
1
<?php
2
/**
3
 *
4
 * This file is part of the Aggrego.
5
 * (c) Tomasz Kunicki <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 */
11
12
declare(strict_types = 1);
13
14
namespace Aggrego\FragmentedDataBoard\Board\Events;
15
16
use Aggrego\AggregateEventConsumer\Shared\Event;
17
use Aggrego\AggregateEventConsumer\Uuid;
18
use Aggrego\Domain\Board\Key;
19
use Aggrego\Domain\Profile\Profile;
20
21
class BoardCreatedEvent extends Event
22
{
23
    public function __construct(Uuid $uuid, Key $key, Profile $profile, ?Uuid $parentUuid)
24
    {
25
        parent::__construct(
26
            [
27
                'uuid' => $uuid->getValue(),
28
                'key' => $key->getValue(),
29
                'profile' => $profile->__toString(),
30
                'parent_uuid' => $parentUuid ? $parentUuid->getValue() : null,
31
            ]
32
        );
33
    }
34
}
35