Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
42.11% |
16 / 38 |
|
35.29% |
12 / 34 |
CRAP | |
0.00% |
0 / 1 |
CriterePrincipeFondamental | |
42.11% |
16 / 38 |
|
35.29% |
12 / 34 |
287.49 | |
0.00% |
0 / 1 |
__construct | |
100.00% |
5 / 5 |
|
100.00% |
1 / 1 |
3 | |||
__clone | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
deserialize | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getLabel | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setLabel | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getLabelLivrable | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setLabelLivrable | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getCode | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setCode | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getReponse | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setReponse | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
isVisible | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setIsVisible | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getTexteConformite | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setTexteConformite | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getTexteNonConformite | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setTexteNonConformite | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getTexteNonApplicable | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setTexteNonApplicable | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getJustification | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setJustification | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getFichier | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setFichier | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getFichierFile | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setFichierFile | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getModeleAnalyse | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setModeleAnalyse | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getAnalyseImpact | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setAnalyseImpact | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
isCanBeModified | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setCanBeModified | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
isDeleteFile | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setDeleteFile | |
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 JMS\Serializer\Annotation as Serializer; |
8 | use Ramsey\Uuid\Uuid; |
9 | use Ramsey\Uuid\UuidInterface; |
10 | use Symfony\Component\HttpFoundation\File\UploadedFile; |
11 | |
12 | /** |
13 | * @Serializer\ExclusionPolicy("none") |
14 | */ |
15 | class CriterePrincipeFondamental |
16 | { |
17 | /** |
18 | * @Serializer\Exclude |
19 | */ |
20 | protected UuidInterface $id; |
21 | |
22 | protected string $label; |
23 | protected string $labelLivrable; |
24 | protected string $code; |
25 | /** |
26 | * @see ReponseCritereFondamentalDictionary |
27 | */ |
28 | private string $reponse; |
29 | private bool $isVisible; |
30 | private string $texteConformite; |
31 | private string $texteNonConformite; |
32 | private string $texteNonApplicable; |
33 | private ?string $justification; |
34 | private ?string $fichier = null; |
35 | private ?UploadedFile $fichierFile = null; |
36 | private bool $canBeModified = true; |
37 | |
38 | /** |
39 | * @Serializer\Exclude |
40 | */ |
41 | private ?ModeleAnalyse $modeleAnalyse; |
42 | |
43 | /** |
44 | * @Serializer\Exclude |
45 | */ |
46 | private ?AnalyseImpact $analyseImpact; |
47 | |
48 | protected bool $deleteFile = false; |
49 | |
50 | public function __construct(?string $label = null, ?string $code = null) |
51 | { |
52 | $this->id = Uuid::uuid4(); |
53 | if (!\is_null($label)) { |
54 | $this->label = $label; |
55 | } |
56 | if (!\is_null($code)) { |
57 | $this->code = $code; |
58 | } |
59 | } |
60 | |
61 | public function __clone() |
62 | { |
63 | $this->id = Uuid::uuid4(); |
64 | } |
65 | |
66 | public function deserialize(): void |
67 | { |
68 | $this->id = Uuid::uuid4(); |
69 | } |
70 | |
71 | public function getId(): UuidInterface |
72 | { |
73 | return $this->id; |
74 | } |
75 | |
76 | public function getLabel(): string |
77 | { |
78 | return $this->label; |
79 | } |
80 | |
81 | public function setLabel(string $label): void |
82 | { |
83 | $this->label = $label; |
84 | } |
85 | |
86 | public function getLabelLivrable(): string |
87 | { |
88 | return $this->labelLivrable; |
89 | } |
90 | |
91 | public function setLabelLivrable(string $labelLivrable): void |
92 | { |
93 | $this->labelLivrable = $labelLivrable; |
94 | } |
95 | |
96 | public function getCode(): string |
97 | { |
98 | return $this->code; |
99 | } |
100 | |
101 | public function setCode(string $code): void |
102 | { |
103 | $this->code = $code; |
104 | } |
105 | |
106 | public function getReponse() |
107 | { |
108 | return $this->reponse; |
109 | } |
110 | |
111 | public function setReponse($reponse): void |
112 | { |
113 | $this->reponse = $reponse; |
114 | } |
115 | |
116 | public function isVisible(): bool |
117 | { |
118 | return $this->isVisible; |
119 | } |
120 | |
121 | public function setIsVisible(bool $isVisible): void |
122 | { |
123 | $this->isVisible = $isVisible; |
124 | } |
125 | |
126 | public function getTexteConformite(): string |
127 | { |
128 | return $this->texteConformite; |
129 | } |
130 | |
131 | public function setTexteConformite(string $texteConformite): void |
132 | { |
133 | $this->texteConformite = $texteConformite; |
134 | } |
135 | |
136 | public function getTexteNonConformite(): string |
137 | { |
138 | return $this->texteNonConformite; |
139 | } |
140 | |
141 | public function setTexteNonConformite(string $texteNonConformite): void |
142 | { |
143 | $this->texteNonConformite = $texteNonConformite; |
144 | } |
145 | |
146 | public function getTexteNonApplicable(): string |
147 | { |
148 | return $this->texteNonApplicable; |
149 | } |
150 | |
151 | public function setTexteNonApplicable(string $texteNonApplicable): void |
152 | { |
153 | $this->texteNonApplicable = $texteNonApplicable; |
154 | } |
155 | |
156 | public function getJustification(): ?string |
157 | { |
158 | return $this->justification; |
159 | } |
160 | |
161 | public function setJustification(?string $justification): void |
162 | { |
163 | $this->justification = $justification; |
164 | } |
165 | |
166 | public function getFichier(): ?string |
167 | { |
168 | return $this->fichier; |
169 | } |
170 | |
171 | public function setFichier(?string $fichier): void |
172 | { |
173 | $this->fichier = $fichier; |
174 | } |
175 | |
176 | public function getFichierFile(): ?UploadedFile |
177 | { |
178 | return $this->fichierFile; |
179 | } |
180 | |
181 | public function setFichierFile(?UploadedFile $fichierFile): void |
182 | { |
183 | $this->fichierFile = $fichierFile; |
184 | } |
185 | |
186 | public function getModeleAnalyse(): ?ModeleAnalyse |
187 | { |
188 | return $this->modeleAnalyse; |
189 | } |
190 | |
191 | public function setModeleAnalyse(?ModeleAnalyse $modeleAnalyse): void |
192 | { |
193 | $this->modeleAnalyse = $modeleAnalyse; |
194 | } |
195 | |
196 | public function getAnalyseImpact(): ?AnalyseImpact |
197 | { |
198 | return $this->analyseImpact; |
199 | } |
200 | |
201 | public function setAnalyseImpact(?AnalyseImpact $analyseImpact): void |
202 | { |
203 | $this->analyseImpact = $analyseImpact; |
204 | } |
205 | |
206 | public function isCanBeModified(): bool |
207 | { |
208 | return $this->canBeModified; |
209 | } |
210 | |
211 | public function setCanBeModified(bool $canBeModified): void |
212 | { |
213 | $this->canBeModified = $canBeModified; |
214 | } |
215 | |
216 | public function isDeleteFile(): bool |
217 | { |
218 | return $this->deleteFile; |
219 | } |
220 | |
221 | public function setDeleteFile(bool $deleteFile): void |
222 | { |
223 | $this->deleteFile = $deleteFile; |
224 | } |
225 | } |