Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
50.00% |
5 / 10 |
|
50.00% |
5 / 10 |
CRAP | |
0.00% |
0 / 1 |
ShelfLife | |
50.00% |
5 / 10 |
|
50.00% |
5 / 10 |
22.50 | |
0.00% |
0 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getTreatment | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setTreatment | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getDuration | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setDuration | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getUltimateFate | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setUltimateFate | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | namespace App\Domain\Registry\Model; |
4 | |
5 | use Ramsey\Uuid\Uuid; |
6 | use Ramsey\Uuid\UuidInterface; |
7 | |
8 | class ShelfLife |
9 | { |
10 | /** |
11 | * @var UuidInterface |
12 | */ |
13 | private $id; |
14 | |
15 | /** |
16 | * @var string |
17 | */ |
18 | public $name; |
19 | |
20 | /** |
21 | * @var string |
22 | */ |
23 | public $duration; |
24 | |
25 | /** |
26 | * @var string|null |
27 | */ |
28 | public $ultimateFate; |
29 | |
30 | /** |
31 | * @var Treatment |
32 | */ |
33 | private $treatment; |
34 | |
35 | public function __construct() |
36 | { |
37 | $this->id = Uuid::uuid4(); |
38 | } |
39 | |
40 | public function getId(): UuidInterface |
41 | { |
42 | return $this->id; |
43 | } |
44 | |
45 | public function getTreatment(): Treatment |
46 | { |
47 | return $this->treatment; |
48 | } |
49 | |
50 | public function setTreatment(Treatment $treatment): void |
51 | { |
52 | $this->treatment = $treatment; |
53 | } |
54 | |
55 | public function getName(): ?string |
56 | { |
57 | return $this->name; |
58 | } |
59 | |
60 | public function setName(string $name): void |
61 | { |
62 | $this->name = $name; |
63 | } |
64 | |
65 | public function getDuration(): ?string |
66 | { |
67 | return $this->duration; |
68 | } |
69 | |
70 | public function setDuration(?string $duration): void |
71 | { |
72 | $this->duration = $duration; |
73 | } |
74 | |
75 | public function getUltimateFate(): ?string |
76 | { |
77 | return $this->ultimateFate; |
78 | } |
79 | |
80 | public function setUltimateFate(?string $ultimateFate): void |
81 | { |
82 | $this->ultimateFate = $ultimateFate; |
83 | } |
84 | } |