Passed
Push — master ( 956624...05ed8c )
by Bertrand
08:49
created

CharacteristicMemento   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 19
c 1
b 0
f 0
dl 0
loc 47
rs 10
wmc 7

7 Methods

Rating   Name   Duplication   Size   Complexity  
A icon() 0 3 1
A id() 0 3 1
A pageId() 0 3 1
A visible() 0 3 1
A title() 0 3 1
A __construct() 0 8 1
A type() 0 3 1
1
<?php
2
3
4
namespace App\Src\UseCases\Domain\Context\Model;
5
6
7
use App\Src\UseCases\Domain\Shared\Model\Memento;
8
9
class CharacteristicMemento implements Memento
10
{
11
    private $id;
12
    private $type;
13
    private $title;
14
    private $visible;
15
    private $icon;
16
    private $pageId;
17
18
    public function __construct(string $id, string $type, string $title, bool $visible, ?string $icon = null, ?int $pageId = null)
19
    {
20
        $this->id = $id;
21
        $this->type = $type;
22
        $this->title = $title;
23
        $this->visible = $visible;
24
        $this->icon = $icon;
25
        $this->pageId = $pageId;
26
    }
27
28
    public function id(): string
29
    {
30
        return $this->id;
31
    }
32
33
    public function type(): string
34
    {
35
        return $this->type;
36
    }
37
38
    public function title(): string
39
    {
40
        return $this->title;
41
    }
42
43
    public function visible(): bool
44
    {
45
        return $this->visible;
46
    }
47
48
    public function icon():? string
49
    {
50
        return $this->icon;
51
    }
52
53
    public function pageId():? int
54
    {
55
        return $this->pageId;
56
    }
57
}
58