Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
76.74% |
165 / 215 |
|
81.25% |
117 / 144 |
CRAP | |
0.00% |
0 / 1 |
Treatment | |
76.74% |
165 / 215 |
|
81.25% |
117 / 144 |
533.49 | |
0.00% |
0 / 1 |
__construct | |
100.00% |
39 / 39 |
|
100.00% |
1 / 1 |
1 | |||
getId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
__toString | |
40.00% |
2 / 5 |
|
0.00% |
0 / 1 |
4.94 | |||
getName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getUpdatedBy | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setUpdatedBy | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getStatut | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setStatut | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getPublic | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setPublic | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getExemptAIPD | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setExemptAIPD | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
isExemptAIPD | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getGoal | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setGoal | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getManager | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setManager | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getToolsString | |
80.00% |
8 / 10 |
|
0.00% |
0 / 1 |
5.20 | |||
isPaperProcessing | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setPaperProcessing | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getLegalBasis | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setLegalBasis | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getLegalBasisJustification | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setLegalBasisJustification | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getObservation | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setObservation | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getDataCategories | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setDataCategories | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getShelfLifes | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setShelfLifes | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
addShelfLife | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
removeShelfLife | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
getDataCategoryOther | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setDataCategoryOther | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getDataOrigin | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setDataOrigin | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getRecipientCategory | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setRecipientCategory | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getSecurityAccessControl | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setSecurityAccessControl | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getSecurityUpdate | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setSecurityUpdate | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getSecuritySaving | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setSecuritySaving | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getSecurityTracability | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setSecurityTracability | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getSecurityOther | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setSecurityOther | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
isLargeScaleCollection | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setLargeScaleCollection | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
isDataCrossing | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setDataCrossing | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
isAutomatedDecisionsWithLegalEffect | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setAutomatedDecisionsWithLegalEffect | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
isEvaluationOrRating | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setEvaluationOrRating | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
isAutomaticExclusionService | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setAutomaticExclusionService | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
isVulnerablePeople | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setVulnerablePeople | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
isSystematicMonitoring | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setSystematicMonitoring | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
isInnovativeUse | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setInnovativeUse | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
isActive | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setActive | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getCompletion | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setCompletion | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
isTemplate | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setTemplate | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getTemplateIdentifier | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setTemplateIdentifier | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getClonedFrom | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setClonedFrom | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getSoftware | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setSoftware | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getConcernedPeopleParticular | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setConcernedPeopleParticular | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getConcernedPeopleUser | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setConcernedPeopleUser | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getConcernedPeopleUsager | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setConcernedPeopleUsager | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getConcernedPeopleAgent | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setConcernedPeopleAgent | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getConcernedPeopleElected | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setConcernedPeopleElected | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getConcernedPeopleCompany | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setConcernedPeopleCompany | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getConcernedPeoplePartner | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setConcernedPeoplePartner | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getConcernedPeopleOther | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setConcernedPeopleOther | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getAuthor | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setAuthor | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getCoordonneesResponsableTraitement | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setCoordonneesResponsableTraitement | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getCollectingMethod | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setCollectingMethod | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getEstimatedConcernedPeople | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setEstimatedConcernedPeople | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
isSecurityEntitledPersons | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setSecurityEntitledPersons | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
isSecurityOpenAccounts | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setSecurityOpenAccounts | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
isSecuritySpecificitiesDelivered | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setSecuritySpecificitiesDelivered | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getConformiteTraitement | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setConformiteTraitement | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getDpoMessage | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setDpoMessage | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getOtherCollectingMethod | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setOtherCollectingMethod | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getLegalMentions | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setLegalMentions | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getConsentRequest | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setConsentRequest | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getConsentRequestFormat | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setConsentRequestFormat | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getTools | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setTools | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
addTool | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
removeTool | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
20 | |||
addContractor | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
removeContractor | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
20 | |||
getContractors | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getMesurements | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setMesurements | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
addMesurement | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
removeMesurement | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
20 | |||
addRequest | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
removeRequest | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
20 | |||
getProofs | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setProofs | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
addProof | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
removeProof | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
20 | |||
getRequests | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setRequests | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
addViolation | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
removeViolation | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
20 | |||
getViolations | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getTreatments | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setTreatments | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
6 | |||
addTreatment | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | /** |
4 | * This file is part of the MADIS - RGPD Management application. |
5 | * |
6 | * @copyright Copyright (c) 2018-2019 Soluris - Solutions Numériques Territoriales Innovantes |
7 | * |
8 | * This program is free software: you can redistribute it and/or modify |
9 | * it under the terms of the GNU Affero General Public License as published by |
10 | * the Free Software Foundation, either version 3 of the License, or |
11 | * (at your option) any later version. |
12 | * |
13 | * This program is distributed in the hope that it will be useful, |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU Affero General Public License for more details. |
17 | * |
18 | * You should have received a copy of the GNU Affero General Public License |
19 | * along with this program. If not, see <https://www.gnu.org/licenses/>. |
20 | */ |
21 | |
22 | declare(strict_types=1); |
23 | |
24 | namespace App\Domain\Registry\Model; |
25 | |
26 | use App\Application\Interfaces\CollectivityRelated; |
27 | use App\Application\Traits\Model\CollectivityTrait; |
28 | use App\Application\Traits\Model\CreatorTrait; |
29 | use App\Application\Traits\Model\HistoryTrait; |
30 | use App\Application\Traits\Model\ServiceTrait; |
31 | use App\Domain\Registry\Model\ConformiteTraitement\ConformiteTraitement; |
32 | use App\Domain\Registry\Model\Embeddable\ComplexChoice; |
33 | use App\Domain\Reporting\Model\LoggableSubject; |
34 | use Doctrine\Common\Collections\ArrayCollection; |
35 | use Doctrine\Common\Collections\Collection; |
36 | use Ramsey\Uuid\Uuid; |
37 | use Ramsey\Uuid\UuidInterface; |
38 | |
39 | class Treatment implements LoggableSubject, CollectivityRelated |
40 | { |
41 | use CollectivityTrait; |
42 | use CreatorTrait; |
43 | use HistoryTrait; |
44 | use ServiceTrait; |
45 | |
46 | /** |
47 | * @var UuidInterface |
48 | */ |
49 | private $id; |
50 | |
51 | /** |
52 | * @var string|null |
53 | */ |
54 | private $name; |
55 | |
56 | /** |
57 | * @var string|null |
58 | */ |
59 | private $updatedBy; |
60 | |
61 | /** |
62 | * @var bool |
63 | */ |
64 | private $public = false; |
65 | |
66 | /** |
67 | * @var bool |
68 | */ |
69 | private $exempt_AIPD = false; |
70 | |
71 | /** |
72 | * FR: Finalités (Objectif). |
73 | * |
74 | * @var string|null |
75 | */ |
76 | private $goal; |
77 | |
78 | /** |
79 | * FR: Gestionnaire. |
80 | * |
81 | * @var string|null |
82 | */ |
83 | private $manager; |
84 | |
85 | /** |
86 | * FR: Traitement papier. |
87 | * |
88 | * @var bool |
89 | */ |
90 | private $paperProcessing; |
91 | |
92 | /** |
93 | * FR: Base légale du traitement. |
94 | * |
95 | * @var string|null |
96 | */ |
97 | private $legalBasis; |
98 | |
99 | /** |
100 | * FR: Justification de la base légale. |
101 | * |
102 | * @var string|null |
103 | */ |
104 | private $legalBasisJustification; |
105 | |
106 | /** |
107 | * @var string|null |
108 | */ |
109 | private $observation; |
110 | |
111 | /** |
112 | * @var iterable |
113 | */ |
114 | private $dataCategories; |
115 | |
116 | /** |
117 | * @var ShelfLife[]|iterable |
118 | */ |
119 | private $shelfLifes; |
120 | |
121 | /** |
122 | * FR: Autres catégories. |
123 | * |
124 | * @var string|null |
125 | */ |
126 | private $dataCategoryOther; |
127 | |
128 | private $software; |
129 | |
130 | /** |
131 | * FR: Origine des données. |
132 | * |
133 | * @var string|null |
134 | */ |
135 | private $dataOrigin; |
136 | |
137 | /** |
138 | * FR: Destinataire des données. |
139 | * |
140 | * @var string|null |
141 | */ |
142 | private $recipientCategory; |
143 | |
144 | /** |
145 | * FR: Contrôle d'accès (mesure de sécurité). |
146 | * |
147 | * @var ComplexChoice |
148 | */ |
149 | private $securityAccessControl; |
150 | |
151 | /** |
152 | * FR: Mises à jour (mesure de sécurité). |
153 | * |
154 | * @var ComplexChoice |
155 | */ |
156 | private $securityUpdate; |
157 | |
158 | /** |
159 | * FR: Sauvegarde (mesure de sécurité). |
160 | * |
161 | * @var ComplexChoice |
162 | */ |
163 | private $securitySaving; |
164 | |
165 | /** |
166 | * FR: Tracabilité (mesure de sécurité). |
167 | * |
168 | * @var ComplexChoice |
169 | */ |
170 | private $securityTracability; |
171 | |
172 | /** |
173 | * FR: Autres (mesure de sécurité). |
174 | * |
175 | * @var ComplexChoice |
176 | */ |
177 | private $securityOther; |
178 | |
179 | /** |
180 | * FR: Je suis en capacité de ressortir les personnes habilitées (mesure de sécurité). |
181 | * |
182 | * @var bool |
183 | */ |
184 | private $securityEntitledPersons; |
185 | |
186 | /** |
187 | * FR: La personne ou la procédure qui permet d’ouvrir des comptes est clairement identifiée (mesure de sécurité). |
188 | * |
189 | * @var bool |
190 | */ |
191 | private $securityOpenAccounts; |
192 | |
193 | /** |
194 | * FR: Les spécificités de sensibilisation liées à ce traitement sont délivrées (mesure de sécurité). |
195 | * |
196 | * @var bool |
197 | */ |
198 | private $securitySpecificitiesDelivered; |
199 | |
200 | /** |
201 | * FR: Collecte à large échelle (traitement spécifique). |
202 | * |
203 | * @var bool |
204 | */ |
205 | private $largeScaleCollection; |
206 | |
207 | /** |
208 | * FR: Croisement d’ensemble de données (traitement spécifique). |
209 | * |
210 | * @var bool |
211 | */ |
212 | private $dataCrossing; |
213 | |
214 | /** |
215 | * FR: Décisions automatisées avec effet juridique (traitement spécifique). |
216 | * |
217 | * @var bool |
218 | */ |
219 | private $automatedDecisionsWithLegalEffect; |
220 | |
221 | /** |
222 | * FR: Évaluation ou notation (traitement spécifique). |
223 | * |
224 | * @var bool |
225 | */ |
226 | private $evaluationOrRating; |
227 | |
228 | /** |
229 | * FR: Exclusion du bénéfice d’un droit, d’un service ou contrat (traitement spécifique). |
230 | * |
231 | * @var bool |
232 | */ |
233 | private $automaticExclusionService; |
234 | |
235 | /** |
236 | * FR: Personnes vulnérables (traitement spécifique). |
237 | * |
238 | * @var bool |
239 | */ |
240 | private $vulnerablePeople; |
241 | |
242 | /** |
243 | * FR: Surveillance systématique (traitement spécifique). |
244 | * |
245 | * @var bool |
246 | */ |
247 | private $systematicMonitoring; |
248 | |
249 | /** |
250 | * FR: Usage innovant (traitement spécifique). |
251 | * |
252 | * @var bool |
253 | */ |
254 | private $innovativeUse; |
255 | |
256 | /** |
257 | * @var bool |
258 | */ |
259 | private $active; |
260 | |
261 | /** |
262 | * @var int |
263 | */ |
264 | private $completion; |
265 | |
266 | /** |
267 | * Please note that this variable goal is only for Database queries, no need to use it in code. |
268 | * |
269 | * @var bool |
270 | */ |
271 | private $template; |
272 | |
273 | /** |
274 | * Please note that this variable goal is only for Database queries, no need to use it in code. |
275 | * |
276 | * @var int|null |
277 | */ |
278 | private $templateIdentifier; |
279 | |
280 | /** |
281 | * @var Treatment|null |
282 | */ |
283 | private $clonedFrom; |
284 | |
285 | /** |
286 | * FR: Particuliers (Personnes concernées). |
287 | * |
288 | * @var ComplexChoice |
289 | */ |
290 | private $concernedPeopleParticular; |
291 | |
292 | /** |
293 | * FR: Usagers (Personnes concernées). |
294 | * |
295 | * @var ComplexChoice |
296 | */ |
297 | private $concernedPeopleUsager; |
298 | |
299 | /** |
300 | * FR: Internautes (Personnes concernées). |
301 | * |
302 | * @var ComplexChoice |
303 | */ |
304 | private $concernedPeopleUser; |
305 | |
306 | /** |
307 | * FR: Salariés (Personnes concernées). |
308 | * |
309 | * @var ComplexChoice |
310 | */ |
311 | private $concernedPeopleAgent; |
312 | |
313 | /** |
314 | * FR: Elus (Personnes concernées). |
315 | * |
316 | * @var ComplexChoice |
317 | */ |
318 | private $concernedPeopleElected; |
319 | |
320 | /** |
321 | * FR: Professionnels (Personnes concernées). |
322 | * |
323 | * @var ComplexChoice |
324 | */ |
325 | private $concernedPeopleCompany; |
326 | |
327 | /** |
328 | * FR: Partenaires (Personnes concernées). |
329 | * |
330 | * @var ComplexChoice |
331 | */ |
332 | private $concernedPeoplePartner; |
333 | |
334 | /** |
335 | * FR: Autres (Personnes concernées). |
336 | * |
337 | * @var ComplexChoice |
338 | */ |
339 | private $concernedPeopleOther; |
340 | |
341 | /** |
342 | * FR: En tant que (Informations générales). |
343 | * |
344 | * @var string|null |
345 | */ |
346 | private $author; |
347 | |
348 | /** |
349 | * @var string|null |
350 | */ |
351 | private $coordonneesResponsableTraitement; |
352 | |
353 | /** |
354 | * FR: Moyens de la collecte des données (Détails). |
355 | * |
356 | * @var array|null |
357 | */ |
358 | private $collectingMethod; |
359 | |
360 | /** |
361 | * FR: Estimation du nombre de personnes (Détails). |
362 | * |
363 | * @var int|null |
364 | */ |
365 | private $estimatedConcernedPeople; |
366 | |
367 | /** |
368 | * @var ConformiteTraitement|null |
369 | */ |
370 | private $conformiteTraitement; |
371 | |
372 | /** |
373 | * FR: Préconisation DPD. |
374 | * |
375 | * @var string|null |
376 | */ |
377 | private $dpoMessage; |
378 | |
379 | /** |
380 | * FR: Statut. |
381 | * |
382 | * @var string|null |
383 | */ |
384 | private $statut; |
385 | |
386 | /** |
387 | * FR: Autre moyen de collecte. |
388 | * |
389 | * @var string|null |
390 | */ |
391 | private $otherCollectingMethod; |
392 | |
393 | private Collection $mesurements; |
394 | private Collection $requests; |
395 | private Collection $violations; |
396 | private Collection $proofs; |
397 | private Collection $tools; |
398 | private Collection $contractors; |
399 | private Collection $treatments; |
400 | |
401 | /** |
402 | * Mentions légales apposées. |
403 | * |
404 | * @var bool |
405 | */ |
406 | private $legalMentions; |
407 | |
408 | /** |
409 | * Consentement demandé. |
410 | * |
411 | * @var bool |
412 | */ |
413 | private $consentRequest; |
414 | |
415 | /** |
416 | * Format de la demande du consentement. |
417 | * |
418 | * @var string|null |
419 | */ |
420 | private $consentRequestFormat; |
421 | |
422 | /** |
423 | * Treatment constructor. |
424 | * |
425 | * @throws \Exception |
426 | */ |
427 | public function __construct() |
428 | { |
429 | $this->id = Uuid::uuid4(); |
430 | $this->paperProcessing = false; |
431 | $this->shelfLifes = []; |
432 | $this->dataCategories = []; |
433 | |
434 | $this->securityAccessControl = new ComplexChoice(); |
435 | $this->securityUpdate = new ComplexChoice(); |
436 | $this->securitySaving = new ComplexChoice(); |
437 | $this->securityTracability = new ComplexChoice(); |
438 | $this->securityOther = new ComplexChoice(); |
439 | $this->securityEntitledPersons = false; |
440 | $this->securityOpenAccounts = false; |
441 | $this->securitySpecificitiesDelivered = false; |
442 | $this->systematicMonitoring = false; |
443 | $this->largeScaleCollection = false; |
444 | $this->vulnerablePeople = false; |
445 | $this->dataCrossing = false; |
446 | $this->evaluationOrRating = false; |
447 | $this->automatedDecisionsWithLegalEffect = false; |
448 | $this->automaticExclusionService = false; |
449 | $this->innovativeUse = false; |
450 | $this->active = true; |
451 | $this->completion = 0; |
452 | $this->template = false; |
453 | |
454 | $this->legalMentions = false; |
455 | $this->concernedPeopleParticular = new ComplexChoice(); |
456 | $this->concernedPeopleUser = new ComplexChoice(); |
457 | $this->concernedPeopleUsager = new ComplexChoice(); |
458 | $this->concernedPeopleAgent = new ComplexChoice(); |
459 | $this->concernedPeopleElected = new ComplexChoice(); |
460 | $this->concernedPeopleCompany = new ComplexChoice(); |
461 | $this->concernedPeoplePartner = new ComplexChoice(); |
462 | $this->concernedPeopleOther = new ComplexChoice(); |
463 | $this->proofs = new ArrayCollection(); |
464 | $this->contractors = new ArrayCollection(); |
465 | $this->requests = new ArrayCollection(); |
466 | $this->violations = new ArrayCollection(); |
467 | $this->tools = new ArrayCollection(); |
468 | $this->mesurements = new ArrayCollection(); |
469 | $this->treatments = new ArrayCollection(); |
470 | } |
471 | |
472 | public function getId(): UuidInterface |
473 | { |
474 | return $this->id; |
475 | } |
476 | |
477 | public function __toString(): string |
478 | { |
479 | if (\is_null($this->getName())) { |
480 | return ''; |
481 | } |
482 | |
483 | if (\mb_strlen($this->getName()) > 150) { |
484 | return \mb_substr($this->getName(), 0, 150) . '...'; |
485 | } |
486 | |
487 | return $this->getName(); |
488 | } |
489 | |
490 | public function getName(): ?string |
491 | { |
492 | return $this->name; |
493 | } |
494 | |
495 | public function setName(?string $name): void |
496 | { |
497 | $this->name = $name; |
498 | } |
499 | |
500 | public function getUpdatedBy(): ?string |
501 | { |
502 | return $this->updatedBy; |
503 | } |
504 | |
505 | public function setUpdatedBy(?string $updatedBy): void |
506 | { |
507 | $this->updatedBy = $updatedBy; |
508 | } |
509 | |
510 | public function getStatut(): ?string |
511 | { |
512 | return $this->statut; |
513 | } |
514 | |
515 | public function setStatut(?string $statut): void |
516 | { |
517 | $this->statut = $statut; |
518 | } |
519 | |
520 | public function getPublic(): ?bool |
521 | { |
522 | return $this->public; |
523 | } |
524 | |
525 | public function setPublic(?bool $public): void |
526 | { |
527 | $this->public = $public; |
528 | } |
529 | |
530 | public function getExemptAIPD(): ?bool |
531 | { |
532 | return $this->exempt_AIPD; |
533 | } |
534 | |
535 | public function setExemptAIPD(?bool $exempt_AIPD): void |
536 | { |
537 | $this->exempt_AIPD = $exempt_AIPD; |
538 | } |
539 | |
540 | public function isExemptAIPD(): bool |
541 | { |
542 | return $this->exempt_AIPD; |
543 | } |
544 | |
545 | public function getGoal(): ?string |
546 | { |
547 | return $this->goal; |
548 | } |
549 | |
550 | public function setGoal(?string $goal): void |
551 | { |
552 | $this->goal = $goal; |
553 | } |
554 | |
555 | public function getManager(): ?string |
556 | { |
557 | return $this->manager; |
558 | } |
559 | |
560 | public function setManager(?string $manager): void |
561 | { |
562 | $this->manager = $manager; |
563 | } |
564 | |
565 | public function getToolsString(): ?string |
566 | { |
567 | $data = $this->getTools(); |
568 | if (!$this->getCollectivity()->isHasModuleTools()) { |
569 | return $this->getSoftware(); |
570 | } |
571 | if (is_null($data)) { |
572 | return null; |
573 | } |
574 | if (is_object($data) && method_exists($data, 'toArray')) { |
575 | $data = $data->toArray(); |
576 | } |
577 | |
578 | return implode(', ', array_map(function ($object) { |
579 | return $object->getName(); |
580 | }, (array) $data)); |
581 | } |
582 | |
583 | public function isPaperProcessing(): bool |
584 | { |
585 | return $this->paperProcessing; |
586 | } |
587 | |
588 | public function setPaperProcessing(bool $paperProcessing): void |
589 | { |
590 | $this->paperProcessing = $paperProcessing; |
591 | } |
592 | |
593 | public function getLegalBasis(): ?string |
594 | { |
595 | return $this->legalBasis; |
596 | } |
597 | |
598 | public function setLegalBasis(?string $legalBasis): void |
599 | { |
600 | $this->legalBasis = $legalBasis; |
601 | } |
602 | |
603 | public function getLegalBasisJustification(): ?string |
604 | { |
605 | return $this->legalBasisJustification; |
606 | } |
607 | |
608 | public function setLegalBasisJustification(?string $legalBasisJustification): void |
609 | { |
610 | $this->legalBasisJustification = $legalBasisJustification; |
611 | } |
612 | |
613 | public function getObservation(): ?string |
614 | { |
615 | return $this->observation; |
616 | } |
617 | |
618 | public function setObservation(?string $observation): void |
619 | { |
620 | $this->observation = $observation; |
621 | } |
622 | |
623 | public function getDataCategories(): iterable |
624 | { |
625 | return $this->dataCategories; |
626 | } |
627 | |
628 | public function setDataCategories(iterable $dataCategories): void |
629 | { |
630 | $this->dataCategories = $dataCategories; |
631 | } |
632 | |
633 | public function getShelfLifes(): iterable |
634 | { |
635 | return $this->shelfLifes; |
636 | } |
637 | |
638 | public function setShelfLifes(iterable $shelfLifes): void |
639 | { |
640 | $this->shelfLifes = $shelfLifes; |
641 | } |
642 | |
643 | public function addShelfLife(ShelfLife $shelfLife): void |
644 | { |
645 | $this->shelfLifes[] = $shelfLife; |
646 | $shelfLife->setTreatment($this); |
647 | } |
648 | |
649 | public function removeShelfLife(ShelfLife $shelfLife) |
650 | { |
651 | $key = \array_search($shelfLife, iterable_to_array($this->shelfLifes), true); |
652 | |
653 | if (false === $key) { |
654 | return; |
655 | } |
656 | |
657 | unset($this->shelfLifes[$key]); |
658 | } |
659 | |
660 | public function getDataCategoryOther(): ?string |
661 | { |
662 | return $this->dataCategoryOther; |
663 | } |
664 | |
665 | public function setDataCategoryOther(?string $dataCategoryOther): void |
666 | { |
667 | $this->dataCategoryOther = $dataCategoryOther; |
668 | } |
669 | |
670 | public function getDataOrigin(): ?string |
671 | { |
672 | return $this->dataOrigin; |
673 | } |
674 | |
675 | public function setDataOrigin(?string $dataOrigin): void |
676 | { |
677 | $this->dataOrigin = $dataOrigin; |
678 | } |
679 | |
680 | public function getRecipientCategory(): ?string |
681 | { |
682 | return $this->recipientCategory; |
683 | } |
684 | |
685 | public function setRecipientCategory(?string $recipientCategory): void |
686 | { |
687 | $this->recipientCategory = $recipientCategory; |
688 | } |
689 | |
690 | public function getSecurityAccessControl(): ComplexChoice |
691 | { |
692 | return $this->securityAccessControl; |
693 | } |
694 | |
695 | public function setSecurityAccessControl(ComplexChoice $securityAccessControl): void |
696 | { |
697 | $this->securityAccessControl = $securityAccessControl; |
698 | } |
699 | |
700 | public function getSecurityUpdate(): ComplexChoice |
701 | { |
702 | return $this->securityUpdate; |
703 | } |
704 | |
705 | public function setSecurityUpdate(ComplexChoice $securityUpdate): void |
706 | { |
707 | $this->securityUpdate = $securityUpdate; |
708 | } |
709 | |
710 | public function getSecuritySaving(): ComplexChoice |
711 | { |
712 | return $this->securitySaving; |
713 | } |
714 | |
715 | public function setSecuritySaving(ComplexChoice $securitySaving): void |
716 | { |
717 | $this->securitySaving = $securitySaving; |
718 | } |
719 | |
720 | public function getSecurityTracability(): ComplexChoice |
721 | { |
722 | return $this->securityTracability; |
723 | } |
724 | |
725 | public function setSecurityTracability(ComplexChoice $securityTracability): void |
726 | { |
727 | $this->securityTracability = $securityTracability; |
728 | } |
729 | |
730 | public function getSecurityOther(): ComplexChoice |
731 | { |
732 | return $this->securityOther; |
733 | } |
734 | |
735 | public function setSecurityOther(ComplexChoice $securityOther): void |
736 | { |
737 | $this->securityOther = $securityOther; |
738 | } |
739 | |
740 | public function isLargeScaleCollection(): bool |
741 | { |
742 | return $this->largeScaleCollection; |
743 | } |
744 | |
745 | public function setLargeScaleCollection(bool $largeScaleCollection): void |
746 | { |
747 | $this->largeScaleCollection = $largeScaleCollection; |
748 | } |
749 | |
750 | public function isDataCrossing(): bool |
751 | { |
752 | return $this->dataCrossing; |
753 | } |
754 | |
755 | public function setDataCrossing(bool $dataCrossing): void |
756 | { |
757 | $this->dataCrossing = $dataCrossing; |
758 | } |
759 | |
760 | public function isAutomatedDecisionsWithLegalEffect(): bool |
761 | { |
762 | return $this->automatedDecisionsWithLegalEffect; |
763 | } |
764 | |
765 | public function setAutomatedDecisionsWithLegalEffect(bool $automatedDecisionsWithLegalEffect): void |
766 | { |
767 | $this->automatedDecisionsWithLegalEffect = $automatedDecisionsWithLegalEffect; |
768 | } |
769 | |
770 | public function isEvaluationOrRating(): bool |
771 | { |
772 | return $this->evaluationOrRating; |
773 | } |
774 | |
775 | public function setEvaluationOrRating(bool $evaluationOrRating): void |
776 | { |
777 | $this->evaluationOrRating = $evaluationOrRating; |
778 | } |
779 | |
780 | public function isAutomaticExclusionService(): bool |
781 | { |
782 | return $this->automaticExclusionService; |
783 | } |
784 | |
785 | public function setAutomaticExclusionService(bool $automaticExclusionService): void |
786 | { |
787 | $this->automaticExclusionService = $automaticExclusionService; |
788 | } |
789 | |
790 | public function isVulnerablePeople(): bool |
791 | { |
792 | return $this->vulnerablePeople; |
793 | } |
794 | |
795 | public function setVulnerablePeople(bool $vulnerablePeople): void |
796 | { |
797 | $this->vulnerablePeople = $vulnerablePeople; |
798 | } |
799 | |
800 | public function isSystematicMonitoring(): bool |
801 | { |
802 | return $this->systematicMonitoring; |
803 | } |
804 | |
805 | public function setSystematicMonitoring(bool $systematicMonitoring): void |
806 | { |
807 | $this->systematicMonitoring = $systematicMonitoring; |
808 | } |
809 | |
810 | public function isInnovativeUse(): bool |
811 | { |
812 | return $this->innovativeUse; |
813 | } |
814 | |
815 | public function setInnovativeUse(bool $innovativeUse): void |
816 | { |
817 | $this->innovativeUse = $innovativeUse; |
818 | } |
819 | |
820 | public function isActive(): bool |
821 | { |
822 | return $this->active; |
823 | } |
824 | |
825 | public function setActive(bool $active): void |
826 | { |
827 | $this->active = $active; |
828 | } |
829 | |
830 | public function getCompletion(): int |
831 | { |
832 | return $this->completion; |
833 | } |
834 | |
835 | public function setCompletion(int $completion): void |
836 | { |
837 | $this->completion = $completion; |
838 | } |
839 | |
840 | public function isTemplate(): bool |
841 | { |
842 | return $this->template; |
843 | } |
844 | |
845 | public function setTemplate(bool $template): void |
846 | { |
847 | $this->template = $template; |
848 | } |
849 | |
850 | public function getTemplateIdentifier(): ?int |
851 | { |
852 | return $this->templateIdentifier; |
853 | } |
854 | |
855 | public function setTemplateIdentifier(?int $templateIdentifier): void |
856 | { |
857 | $this->templateIdentifier = $templateIdentifier; |
858 | } |
859 | |
860 | public function getClonedFrom(): ?Treatment |
861 | { |
862 | return $this->clonedFrom; |
863 | } |
864 | |
865 | public function setClonedFrom(?Treatment $clonedFrom): void |
866 | { |
867 | $this->clonedFrom = $clonedFrom; |
868 | } |
869 | |
870 | public function getSoftware(): ?string |
871 | { |
872 | return $this->software; |
873 | } |
874 | |
875 | public function setSoftware(?string $software): void |
876 | { |
877 | $this->software = $software; |
878 | } |
879 | |
880 | public function getConcernedPeopleParticular(): ComplexChoice |
881 | { |
882 | return $this->concernedPeopleParticular; |
883 | } |
884 | |
885 | public function setConcernedPeopleParticular(ComplexChoice $concernedPeopleParticular): void |
886 | { |
887 | $this->concernedPeopleParticular = $concernedPeopleParticular; |
888 | } |
889 | |
890 | public function getConcernedPeopleUser(): ComplexChoice |
891 | { |
892 | return $this->concernedPeopleUser; |
893 | } |
894 | |
895 | public function setConcernedPeopleUser(ComplexChoice $concernedPeopleUser): void |
896 | { |
897 | $this->concernedPeopleUser = $concernedPeopleUser; |
898 | } |
899 | |
900 | public function getConcernedPeopleUsager(): ComplexChoice |
901 | { |
902 | return $this->concernedPeopleUsager; |
903 | } |
904 | |
905 | public function setConcernedPeopleUsager(ComplexChoice $concernedPeopleUsager): void |
906 | { |
907 | $this->concernedPeopleUsager = $concernedPeopleUsager; |
908 | } |
909 | |
910 | public function getConcernedPeopleAgent(): ComplexChoice |
911 | { |
912 | return $this->concernedPeopleAgent; |
913 | } |
914 | |
915 | public function setConcernedPeopleAgent(ComplexChoice $concernedPeopleAgent): void |
916 | { |
917 | $this->concernedPeopleAgent = $concernedPeopleAgent; |
918 | } |
919 | |
920 | public function getConcernedPeopleElected(): ComplexChoice |
921 | { |
922 | return $this->concernedPeopleElected; |
923 | } |
924 | |
925 | public function setConcernedPeopleElected(ComplexChoice $concernedPeopleElected): void |
926 | { |
927 | $this->concernedPeopleElected = $concernedPeopleElected; |
928 | } |
929 | |
930 | public function getConcernedPeopleCompany(): ComplexChoice |
931 | { |
932 | return $this->concernedPeopleCompany; |
933 | } |
934 | |
935 | public function setConcernedPeopleCompany(ComplexChoice $concernedPeopleCompany): void |
936 | { |
937 | $this->concernedPeopleCompany = $concernedPeopleCompany; |
938 | } |
939 | |
940 | public function getConcernedPeoplePartner(): ComplexChoice |
941 | { |
942 | return $this->concernedPeoplePartner; |
943 | } |
944 | |
945 | public function setConcernedPeoplePartner(ComplexChoice $concernedPeoplePartner): void |
946 | { |
947 | $this->concernedPeoplePartner = $concernedPeoplePartner; |
948 | } |
949 | |
950 | public function getConcernedPeopleOther(): ComplexChoice |
951 | { |
952 | return $this->concernedPeopleOther; |
953 | } |
954 | |
955 | public function setConcernedPeopleOther(ComplexChoice $concernedPeopleOther): void |
956 | { |
957 | $this->concernedPeopleOther = $concernedPeopleOther; |
958 | } |
959 | |
960 | public function getAuthor(): ?string |
961 | { |
962 | return $this->author; |
963 | } |
964 | |
965 | public function setAuthor(?string $author): void |
966 | { |
967 | $this->author = $author; |
968 | } |
969 | |
970 | public function getCoordonneesResponsableTraitement(): ?string |
971 | { |
972 | return $this->coordonneesResponsableTraitement; |
973 | } |
974 | |
975 | public function setCoordonneesResponsableTraitement(?string $coordonneesResponsableTraitement): void |
976 | { |
977 | $this->coordonneesResponsableTraitement = $coordonneesResponsableTraitement; |
978 | } |
979 | |
980 | public function getCollectingMethod(): ?array |
981 | { |
982 | return $this->collectingMethod; |
983 | } |
984 | |
985 | public function setCollectingMethod($collectingMethod): void |
986 | { |
987 | $this->collectingMethod = $collectingMethod; |
988 | } |
989 | |
990 | public function getEstimatedConcernedPeople(): ?int |
991 | { |
992 | return $this->estimatedConcernedPeople; |
993 | } |
994 | |
995 | public function setEstimatedConcernedPeople(?int $estimatedConcernedPeople): void |
996 | { |
997 | $this->estimatedConcernedPeople = $estimatedConcernedPeople; |
998 | } |
999 | |
1000 | public function isSecurityEntitledPersons(): bool |
1001 | { |
1002 | return $this->securityEntitledPersons; |
1003 | } |
1004 | |
1005 | public function setSecurityEntitledPersons(bool $securityEntitledPersons): void |
1006 | { |
1007 | $this->securityEntitledPersons = $securityEntitledPersons; |
1008 | } |
1009 | |
1010 | public function isSecurityOpenAccounts(): bool |
1011 | { |
1012 | return $this->securityOpenAccounts; |
1013 | } |
1014 | |
1015 | public function setSecurityOpenAccounts(bool $securityOpenAccounts): void |
1016 | { |
1017 | $this->securityOpenAccounts = $securityOpenAccounts; |
1018 | } |
1019 | |
1020 | public function isSecuritySpecificitiesDelivered(): bool |
1021 | { |
1022 | return $this->securitySpecificitiesDelivered; |
1023 | } |
1024 | |
1025 | public function setSecuritySpecificitiesDelivered(bool $securitySpecificitiesDelivered): void |
1026 | { |
1027 | $this->securitySpecificitiesDelivered = $securitySpecificitiesDelivered; |
1028 | } |
1029 | |
1030 | public function getConformiteTraitement(): ?ConformiteTraitement |
1031 | { |
1032 | return $this->conformiteTraitement; |
1033 | } |
1034 | |
1035 | public function setConformiteTraitement(?ConformiteTraitement $conformiteTraitement = null): void |
1036 | { |
1037 | $this->conformiteTraitement = $conformiteTraitement; |
1038 | } |
1039 | |
1040 | public function getDpoMessage(): ?string |
1041 | { |
1042 | return $this->dpoMessage; |
1043 | } |
1044 | |
1045 | public function setDpoMessage(?string $dpoMessage): void |
1046 | { |
1047 | $this->dpoMessage = $dpoMessage; |
1048 | } |
1049 | |
1050 | public function getOtherCollectingMethod(): ?string |
1051 | { |
1052 | return $this->otherCollectingMethod; |
1053 | } |
1054 | |
1055 | public function setOtherCollectingMethod(?string $otherCollectingMethod): void |
1056 | { |
1057 | $this->otherCollectingMethod = $otherCollectingMethod; |
1058 | } |
1059 | |
1060 | public function getLegalMentions(): ?bool |
1061 | { |
1062 | return $this->legalMentions; |
1063 | } |
1064 | |
1065 | public function setLegalMentions(?bool $legalMentions): void |
1066 | { |
1067 | $this->legalMentions = $legalMentions; |
1068 | } |
1069 | |
1070 | public function getConsentRequest(): ?bool |
1071 | { |
1072 | return $this->consentRequest; |
1073 | } |
1074 | |
1075 | public function setConsentRequest(?bool $consentRequest): void |
1076 | { |
1077 | $this->consentRequest = $consentRequest; |
1078 | } |
1079 | |
1080 | public function getConsentRequestFormat(): ?string |
1081 | { |
1082 | return $this->consentRequestFormat; |
1083 | } |
1084 | |
1085 | public function setConsentRequestFormat(?string $consentRequestFormat): void |
1086 | { |
1087 | $this->consentRequestFormat = $consentRequestFormat; |
1088 | } |
1089 | |
1090 | public function getTools(): Collection |
1091 | { |
1092 | return $this->tools; |
1093 | } |
1094 | |
1095 | public function setTools(Collection $tools): void |
1096 | { |
1097 | $this->tools = $tools; |
1098 | } |
1099 | |
1100 | public function addTool(Tool $tool) |
1101 | { |
1102 | $this->tools->add($tool); |
1103 | } |
1104 | |
1105 | public function removeTool(Tool $tool): void |
1106 | { |
1107 | if ($this->tools && $this->tools->count() && $this->tools->contains($tool)) { |
1108 | $this->tools->removeElement($tool); |
1109 | } |
1110 | } |
1111 | |
1112 | public function addContractor(Contractor $contractor): void |
1113 | { |
1114 | $this->contractors[] = $contractor; |
1115 | } |
1116 | |
1117 | public function removeContractor(Contractor $contractor): void |
1118 | { |
1119 | if ($this->contractors && $this->contractors->count() && $this->contractors->contains($contractor)) { |
1120 | $this->contractors->removeElement($contractor); |
1121 | } |
1122 | } |
1123 | |
1124 | public function getContractors(): Collection |
1125 | { |
1126 | return $this->contractors; |
1127 | } |
1128 | |
1129 | public function getMesurements(): Collection |
1130 | { |
1131 | return $this->mesurements; |
1132 | } |
1133 | |
1134 | public function setMesurements(Collection $mesurements): void |
1135 | { |
1136 | $this->mesurements = $mesurements; |
1137 | } |
1138 | |
1139 | public function addMesurement(Mesurement $mesurement): void |
1140 | { |
1141 | $mesurement->addTreatment($this); |
1142 | $this->mesurements[] = $mesurement; |
1143 | } |
1144 | |
1145 | public function removeMesurement(Mesurement $mesurement): void |
1146 | { |
1147 | $mesurement->removeTreatment($this); |
1148 | |
1149 | if ($this->mesurements && $this->mesurements->count() && $this->mesurements->contains($mesurement)) { |
1150 | $this->mesurements->removeElement($mesurement); |
1151 | } |
1152 | } |
1153 | |
1154 | public function addRequest(Request $request): void |
1155 | { |
1156 | $request->addTreatment($this); |
1157 | $this->requests[] = $request; |
1158 | } |
1159 | |
1160 | public function removeRequest(Request $request): void |
1161 | { |
1162 | $request->removeTreatment($this); |
1163 | |
1164 | if ($this->requests && $this->requests->count() && $this->requests->contains($request)) { |
1165 | $this->requests->removeElement($request); |
1166 | } |
1167 | } |
1168 | |
1169 | public function getProofs(): Collection |
1170 | { |
1171 | return $this->proofs; |
1172 | } |
1173 | |
1174 | public function setProofs(Collection $proofs): void |
1175 | { |
1176 | $this->proofs = $proofs; |
1177 | } |
1178 | |
1179 | public function addProof(Proof $proof): void |
1180 | { |
1181 | $proof->addTreatment($this); |
1182 | $this->proofs[] = $proof; |
1183 | } |
1184 | |
1185 | public function removeProof(Proof $proof): void |
1186 | { |
1187 | $proof->removeTreatment($this); |
1188 | |
1189 | if ($this->proofs && $this->proofs->count() && $this->proofs->contains($proof)) { |
1190 | $this->proofs->removeElement($proof); |
1191 | } |
1192 | } |
1193 | |
1194 | public function getRequests(): Collection |
1195 | { |
1196 | return $this->requests; |
1197 | } |
1198 | |
1199 | public function setRequests(Collection $requests) |
1200 | { |
1201 | $this->requests = $requests; |
1202 | } |
1203 | |
1204 | public function addViolation(Violation $violation): void |
1205 | { |
1206 | $violation->addTreatment($this); |
1207 | $this->violations[] = $violation; |
1208 | } |
1209 | |
1210 | public function removeViolation(Violation $violation): void |
1211 | { |
1212 | $violation->removeTreatment($this); |
1213 | |
1214 | if ($this->violations && $this->violations->count() && $this->violations->contains($violation)) { |
1215 | $this->violations->removeElement($violation); |
1216 | } |
1217 | } |
1218 | |
1219 | public function getViolations() |
1220 | { |
1221 | return $this->violations; |
1222 | } |
1223 | |
1224 | public function getTreatments(): ArrayCollection|Collection |
1225 | { |
1226 | return $this->treatments; |
1227 | } |
1228 | |
1229 | public function setTreatments(ArrayCollection|Collection $treatments): void |
1230 | { |
1231 | $this->treatments = $treatments; |
1232 | foreach ($treatments as $treatment) { |
1233 | $treatment->addTreatment($this); |
1234 | } |
1235 | } |
1236 | |
1237 | public function addTreatment(Treatment $treatment): void |
1238 | { |
1239 | $this->treatments->add($treatment); |
1240 | } |
1241 | } |