Passed
Push — master ( 5e83b7...81caf8 )
by Tomasz
02:02
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
declare(strict_types = 1);
4
5
namespace Aggrego\Domain\Api\Command\CreateBoard;
6
7
use Aggrego\Domain\Board\Key;
8
use Aggrego\Domain\Profile\Profile;
9
10
class Command
11
{
12
    /** @var Key */
13
    private $key;
14
15
    /** @var Profile Profile */
16
    private $profile;
17
18
    public function __construct(array $key, string $profileName, string $versionNumber)
19
    {
20
        $this->key = new Key($key);
21
        $this->profile = Profile::createFrom($profileName, $versionNumber);
22
    }
23
24
    public function getKey(): Key
25
    {
26
        return $this->key;
27
    }
28
29
    public function getProfile(): Profile
30
    {
31
        return $this->profile;
32
    }
33
}
34