Completed
Push — master ( 804716...5e83b7 )
by Tomasz
03:36
created

Board::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 3
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Aggrego\Domain\Profile\BoardConstruction\FinalBoardModel;
6
7
use Aggrego\Domain\Profile\BoardConstruction\Board as BoardInterface;
8
use Aggrego\Domain\Profile\Profile;
9
use Aggrego\Domain\ProgressiveBoard\Step\Step;
10
use Aggrego\Domain\ProgressiveBoard\Step\Steps\FinalStep;
11
use Aggrego\Domain\Shared\ValueObject\Data;
12
use Aggrego\Domain\Shared\ValueObject\Key;
13
14
class Board implements BoardInterface
15
{
16
    /** @var Key */
17
    private $key;
18
19
    /** @var Profile */
20
    private $profile;
21
22
    /** @var Data */
23
    private $data;
24
25
    public function __construct(Key $key, Profile $profile, Data $data)
26
    {
27
        $this->key = $key;
28
        $this->profile = $profile;
29
        $this->data = $data;
30
    }
31
32
    public function getKey(): Key
33
    {
34
        return $this->key;
35
    }
36
37
    public function getProfile(): Profile
38
    {
39
        return $this->profile;
40
    }
41
42
    public function getData(): Data
43
    {
44
        return $this->data;
45
    }
46
47
    public function getStep(): Step
48
    {
49
        return new FinalStep($this->data);
50
    }
51
}
52