Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
41.67% |
5 / 12 |
|
41.67% |
5 / 12 |
CRAP | |
0.00% |
0 / 1 |
ReviewData | |
41.67% |
5 / 12 |
|
41.67% |
5 / 12 |
40.58 | |
0.00% |
0 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getDocumentName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setDocumentName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getLogo | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setLogo | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getSections | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setSections | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
isShowCollectivityLogoFooter | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setShowCollectivityLogoFooter | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
isShowDPDLogoFooter | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setShowDPDLogoFooter | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
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\User\Model; |
25 | |
26 | use App\Application\Traits\Model\CollectivityTrait; |
27 | use App\Application\Traits\Model\HistoryTrait; |
28 | use Ramsey\Uuid\Uuid; |
29 | use Ramsey\Uuid\UuidInterface; |
30 | |
31 | class ReviewData |
32 | { |
33 | use CollectivityTrait; |
34 | use HistoryTrait; |
35 | |
36 | public const TREATMENT_REGISTRY = 'treatment_registry'; |
37 | public const CONTRACTOR_REGISTRY = 'contractor_registry'; |
38 | public const TOOL_REGISTRY = 'tool_registry'; |
39 | public const REQUEST_REGISTRY = 'request_registry'; |
40 | public const VIOLATION_REGISTRY = 'violation_registry'; |
41 | public const CONFORMITY_EVALUATION = 'conformity_evaluation'; |
42 | public const TREATMENT_CONFORMITY = 'treatment_conformity'; |
43 | public const AIPD = 'aipd'; |
44 | public const COLLECTIVITY_CONFORMITY = 'collectivity_conformity'; |
45 | public const PROTECT_ACTIONS = 'protect_actions'; |
46 | public const CONTINUOUS_AMELIORATION = 'continuous_amelioration'; |
47 | public const PROOF_LIST = 'proof_list'; |
48 | public const USER_LIST = 'user_list'; |
49 | public const SUIVI = 'suivi'; |
50 | |
51 | /** |
52 | * @var UuidInterface |
53 | */ |
54 | private $id; |
55 | |
56 | /** |
57 | * @var string|null |
58 | */ |
59 | private $documentName; |
60 | |
61 | /** |
62 | * @var string|null |
63 | */ |
64 | private $logo; |
65 | |
66 | private array $sections = [ |
67 | ReviewData::CONTINUOUS_AMELIORATION, |
68 | ReviewData::CONTRACTOR_REGISTRY, |
69 | ReviewData::PROOF_LIST, |
70 | ReviewData::PROTECT_ACTIONS, |
71 | ReviewData::REQUEST_REGISTRY, |
72 | ReviewData::SUIVI, |
73 | ReviewData::TREATMENT_CONFORMITY, |
74 | ReviewData::AIPD, |
75 | ReviewData::COLLECTIVITY_CONFORMITY, |
76 | ReviewData::CONFORMITY_EVALUATION, |
77 | ReviewData::TREATMENT_REGISTRY, |
78 | ReviewData::USER_LIST, |
79 | ReviewData::VIOLATION_REGISTRY, |
80 | ReviewData::TOOL_REGISTRY, |
81 | ]; |
82 | |
83 | /** |
84 | * @var bool |
85 | */ |
86 | private $showCollectivityLogoFooter; |
87 | |
88 | /** |
89 | * @var bool |
90 | */ |
91 | private $showDPDLogoFooter; |
92 | |
93 | /** |
94 | * @var Collectivity |
95 | */ |
96 | private $collectivity; |
97 | |
98 | public function __construct() |
99 | { |
100 | $this->id = Uuid::uuid4(); |
101 | } |
102 | |
103 | public function getId(): UuidInterface |
104 | { |
105 | return $this->id; |
106 | } |
107 | |
108 | public function getDocumentName(): ?string |
109 | { |
110 | return $this->documentName; |
111 | } |
112 | |
113 | public function setDocumentName(?string $documentName): void |
114 | { |
115 | $this->documentName = $documentName; |
116 | } |
117 | |
118 | public function getLogo(): ?string |
119 | { |
120 | return $this->logo; |
121 | } |
122 | |
123 | public function setLogo(?string $logo): void |
124 | { |
125 | $this->logo = $logo; |
126 | } |
127 | |
128 | public function getSections(): array |
129 | { |
130 | return $this->sections; |
131 | } |
132 | |
133 | public function setSections(array $sections): void |
134 | { |
135 | $this->sections = $sections; |
136 | } |
137 | |
138 | public function isShowCollectivityLogoFooter(): bool |
139 | { |
140 | return $this->showCollectivityLogoFooter; |
141 | } |
142 | |
143 | public function setShowCollectivityLogoFooter(bool $showCollectivityLogoFooter): void |
144 | { |
145 | $this->showCollectivityLogoFooter = $showCollectivityLogoFooter; |
146 | } |
147 | |
148 | public function isShowDPDLogoFooter(): bool |
149 | { |
150 | return $this->showDPDLogoFooter; |
151 | } |
152 | |
153 | public function setShowDPDLogoFooter(bool $showDPDLogoFooter): void |
154 | { |
155 | $this->showDPDLogoFooter = $showDPDLogoFooter; |
156 | } |
157 | } |