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

Command::getData()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Aggrego\Domain\Api\Domain\Command\UpdateBoard;
6
7
use Aggrego\Domain\Profile\Profile;
8
use Aggrego\Domain\Shared\ValueObject\Data;
9
use Aggrego\Domain\Shared\ValueObject\Uuid;
10
11
class Command
12
{
13
    /** @var Uuid */
14
    private $boardUuid;
15
16
    /** @var Uuid */
17
    private $shardUuid;
18
19
    /** @var Profile */
20
    private $profile;
21
22
    /** @var Data */
23
    private $data;
24
25
    public function __construct(
26
        string $boardUuid,
27
        string $shardUuid,
28
        string $profileName,
29
        string $versionName,
30
        string $data
31
    )
32
    {
33
        $this->boardUuid = new Uuid($boardUuid);
34
        $this->shardUuid = new Uuid($shardUuid);
35
        $this->profile = Profile::createFrom($profileName, $versionName);
36
        $this->data = new Data($data);
37
    }
38
39
    public function getBoardUuid(): Uuid
40
    {
41
        return $this->boardUuid;
42
    }
43
44
    public function getShardUuid(): Uuid
45
    {
46
        return $this->shardUuid;
47
    }
48
49
    public function getProfile(): Profile
50
    {
51
        return $this->profile;
52
    }
53
54
    public function getData(): Data
55
    {
56
        return $this->data;
57
    }
58
}
59