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

ShardUpdatedEvent   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Aggrego\Domain\Model\ProgressiveBoard\Events;
6
7
use Aggrego\Domain\Model\ProgressiveBoard\Shard\FinalItem;
8
use Aggrego\Domain\Shared\Event\Model\Events\Event;
9
10
class ShardUpdatedEvent extends Event
11
{
12
    public function __construct(FinalItem $board)
13
    {
14
        parent::__construct(
15
            [
16
                'shard_uuid' => $board->getUuid()->getValue(),
17
                'profile' => [
18
                    'name' => $board->getProfile()->getName()->getValue(),
19
                    'version' => $board->getProfile()->getVersion()->getValue(),
20
                ],
21
                'data' => $board->getData()->getValue()
22
            ]
23
        );
24
    }
25
}
26