Board   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 31
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getMetadata() 0 3 1
A __construct() 0 5 1
A getProfile() 0 3 1
A getKey() 0 3 1
1
<?php
2
/**
3
 *
4
 * This file is part of the Aggrego.
5
 * (c) Tomasz Kunicki <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 */
11
12
declare(strict_types = 1);
13
14
namespace Aggrego\DataDomainBoard\Board\Prototype;
15
16
use Aggrego\DataDomainBoard\Board\Data;
17
use Aggrego\Domain\Board\Key;
18
use Aggrego\Domain\Board\Prototype\Metadata as DomainMetadata;
19
use Aggrego\Domain\Board\Prototype\Board as BoardInterface;
20
use Aggrego\Domain\Profile\Profile;
21
22
class Board implements BoardInterface
23
{
24
    /** @var Key */
25
    private $key;
26
27
    /** @var Profile */
28
    private $profile;
29
30
    /** @var Data */
31
    private $data;
32
33
    public function __construct(Key $key, Profile $profile, Data $data)
34
    {
35
        $this->key = $key;
36
        $this->profile = $profile;
37
        $this->data = $data;
38
    }
39
40
    public function getKey(): Key
41
    {
42
        return $this->key;
43
    }
44
45
    public function getProfile(): Profile
46
    {
47
        return $this->profile;
48
    }
49
50
    public function getMetadata(): DomainMetadata
51
    {
52
        return new Metadata($this->data);
53
    }
54
}
55