Command   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 13
dl 0
loc 46
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getData() 0 3 1
A getBoardUuid() 0 3 1
A getProfile() 0 3 1
A getShardUuid() 0 3 1
A __construct() 0 12 1
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\FragmentedDataBoardDomain\Api\Domain\Command\UpdateBoard;
15
16
use Aggrego\AggregateEventConsumer\Uuid;
17
use Aggrego\Domain\Profile\Profile;
18
use Aggrego\FragmentedDataBoardDomain\Board\Data;
19
use Aggrego\FragmentedDataBoardDomain\Board\Shard\Uuid as ShardUuid;
20
21
class Command
22
{
23
    /** @var Uuid */
24
    private $boardUuid;
25
26
    /** @var ShardUuid */
27
    private $shardUuid;
28
29
    /** @var Profile */
30
    private $profile;
31
32
    /** @var Data */
33
    private $data;
34
35
    public function __construct(
36
        string $boardUuid,
37
        string $shardUuid,
38
        string $profileName,
39
        string $versionName,
40
        string $data
41
    )
42
    {
43
        $this->boardUuid = new Uuid($boardUuid);
44
        $this->shardUuid = new ShardUuid($shardUuid);
45
        $this->profile = Profile::createFrom($profileName, $versionName);
46
        $this->data = new Data($data);
47
    }
48
49
    public function getBoardUuid(): Uuid
50
    {
51
        return $this->boardUuid;
52
    }
53
54
    public function getShardUuid(): ShardUuid
55
    {
56
        return $this->shardUuid;
57
    }
58
59
    public function getProfile(): Profile
60
    {
61
        return $this->profile;
62
    }
63
64
    public function getData(): Data
65
    {
66
        return $this->data;
67
    }
68
}
69