Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 23 |
|
0.00% |
0 / 23 |
CRAP | |
0.00% |
0 / 1 |
AbstractMesureProtection | |
0.00% |
0 / 23 |
|
0.00% |
0 / 23 |
552 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getIdString | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setIdFromString | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
__toString | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getNom | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setNom | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getNomCourt | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setNomCourt | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getLabelLivrable | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setLabelLivrable | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getPhrasePreconisation | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setPhrasePreconisation | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getDetail | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setDetail | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getPoidsVraisemblance | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setPoidsVraisemblance | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getPoidsGravite | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setPoidsGravite | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getCreatedAt | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setCreatedAt | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getUpdatedAt | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setUpdatedAt | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace App\Domain\AIPD\Model; |
6 | |
7 | use App\Application\Traits\Model\HistoryTrait; |
8 | use Gedmo\Mapping\Annotation as Gedmo; |
9 | use JMS\Serializer\Annotation as Serializer; |
10 | use Ramsey\Uuid\Uuid; |
11 | use Ramsey\Uuid\UuidInterface; |
12 | |
13 | class AbstractMesureProtection |
14 | { |
15 | // use HistoryTrait; |
16 | /** |
17 | * @Serializer\Accessor(getter="getIdString",setter="setIdFromString") |
18 | * |
19 | * @Serializer\Type("string") |
20 | */ |
21 | private UuidInterface $id; |
22 | private string $nom; |
23 | private string $nomCourt; |
24 | private string $labelLivrable; |
25 | private string $phrasePreconisation; |
26 | private string $detail; |
27 | private int $poidsVraisemblance; |
28 | private int $poidsGravite; |
29 | |
30 | /** |
31 | * @var \DateTimeImmutable|null |
32 | * |
33 | * @Serializer\Type("DateTimeImmutable") |
34 | * |
35 | * @Gedmo\Timestampable(on="create") |
36 | */ |
37 | private $createdAt; |
38 | |
39 | /** |
40 | * @var \DateTimeImmutable|null |
41 | * |
42 | * @Serializer\Type("DateTimeImmutable") |
43 | * |
44 | * @Gedmo\Timestampable(on="update") |
45 | */ |
46 | private $updatedAt; |
47 | |
48 | public function __construct() |
49 | { |
50 | $this->id = Uuid::uuid4(); |
51 | } |
52 | |
53 | public function getId() |
54 | { |
55 | return $this->id; |
56 | } |
57 | |
58 | public function getIdString() |
59 | { |
60 | return $this->id->toString(); |
61 | } |
62 | |
63 | public function setIdFromString(string $str) |
64 | { |
65 | $this->id = Uuid::fromString($str); |
66 | } |
67 | |
68 | public function __toString(): string |
69 | { |
70 | return $this->nom; |
71 | } |
72 | |
73 | public function getNom(): string |
74 | { |
75 | return $this->nom; |
76 | } |
77 | |
78 | public function setNom(string $nom): void |
79 | { |
80 | $this->nom = $nom; |
81 | } |
82 | |
83 | public function getNomCourt(): string |
84 | { |
85 | return $this->nomCourt; |
86 | } |
87 | |
88 | public function setNomCourt(string $nomCourt): void |
89 | { |
90 | $this->nomCourt = $nomCourt; |
91 | } |
92 | |
93 | public function getLabelLivrable(): string |
94 | { |
95 | return $this->labelLivrable; |
96 | } |
97 | |
98 | public function setLabelLivrable(string $labelLivrable): void |
99 | { |
100 | $this->labelLivrable = $labelLivrable; |
101 | } |
102 | |
103 | public function getPhrasePreconisation(): string |
104 | { |
105 | return $this->phrasePreconisation; |
106 | } |
107 | |
108 | public function setPhrasePreconisation(string $phrasePreconisation): void |
109 | { |
110 | $this->phrasePreconisation = $phrasePreconisation; |
111 | } |
112 | |
113 | public function getDetail(): string |
114 | { |
115 | return $this->detail; |
116 | } |
117 | |
118 | public function setDetail(string $detail): void |
119 | { |
120 | $this->detail = $detail; |
121 | } |
122 | |
123 | public function getPoidsVraisemblance(): int |
124 | { |
125 | return $this->poidsVraisemblance; |
126 | } |
127 | |
128 | public function setPoidsVraisemblance(int $poidsVraisemblance): void |
129 | { |
130 | $this->poidsVraisemblance = $poidsVraisemblance; |
131 | } |
132 | |
133 | public function getPoidsGravite(): int |
134 | { |
135 | return $this->poidsGravite; |
136 | } |
137 | |
138 | public function setPoidsGravite(int $poidsGravite): void |
139 | { |
140 | $this->poidsGravite = $poidsGravite; |
141 | } |
142 | |
143 | public function getCreatedAt(): ?\DateTimeImmutable |
144 | { |
145 | return $this->createdAt; |
146 | } |
147 | |
148 | public function setCreatedAt(\DateTimeImmutable $createdAt): void |
149 | { |
150 | $this->createdAt = $createdAt; |
151 | } |
152 | |
153 | public function getUpdatedAt(): ?\DateTimeImmutable |
154 | { |
155 | return $this->updatedAt; |
156 | } |
157 | |
158 | public function setUpdatedAt(\DateTimeImmutable $updatedAt): void |
159 | { |
160 | $this->updatedAt = $updatedAt; |
161 | } |
162 | } |