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

Command::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 3
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Aggrego\Domain\Api\Domain\Command\CreateBoard;
4
5
use Aggrego\Domain\Profile\Profile;
6
use Aggrego\Domain\Shared\ValueObject\Key;
7
8
class Command
9
{
10
    /** @var Key */
11
    private $key;
12
13
    /** @var Profile Profile */
14
    private $profile;
15
16
    public function __construct(array $key, string $profileName, string $versionNumber)
17
    {
18
        $this->key = new Key($key);
19
        $this->profile = Profile::createFrom($profileName, $versionNumber);
20
    }
21
22
    public function getKey(): Key
23
    {
24
        return $this->key;
25
    }
26
27
    public function getProfile(): Profile
28
    {
29
        return $this->profile;
30
    }
31
}
32