Passed
Push — master ( 2ee0d1...1e8995 )
by Tomasz
03:21
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 getProfile() 0 3 1
A getKey() 0 3 1
A __construct() 0 4 1
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