Passed
Push — master ( 2ee0d1...1e8995 )
by Tomasz
03:21
created

ShardAddedEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 1
dl 0
loc 9
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Aggrego\Domain\Model\ProgressiveBoard\Events;
6
7
use Aggrego\Domain\Model\ProgressiveBoard\Shard\InitialItem;
8
use Aggrego\Domain\Shared\Event\Model\Events\Event;
9
10
class ShardAddedEvent extends Event
11
{
12
    public function __construct(InitialItem $board)
13
    {
14
        parent::__construct(
15
            [
16
                'shard_uuid' => $board->getUuid()->getValue(),
17
                'key' => $board->getKey()->getValue(),
18
                'profile' => [
19
                    'name' => $board->getProfile()->getName()->getValue(),
20
                    'version' => $board->getProfile()->getVersion()->getValue(),
21
                ],
22
            ]
23
        );
24
    }
25
}
26