Passed
Push — master ( 5e83b7...81caf8 )
by Tomasz
02:02
created

Command   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getKey() 0 3 1
A getProfile() 0 3 1
A __construct() 0 4 1
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