BoardCreatedEvent::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 2
nc 1
nop 4
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