Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 9 |
|
0.00% |
0 / 8 |
CRAP | |
0.00% |
0 / 1 |
OptionalAnswer | |
0.00% |
0 / 9 |
|
0.00% |
0 / 8 |
72 | |
0.00% |
0 / 1 |
__construct | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
getId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getReason | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setReason | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getQuestion | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setQuestion | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getSurvey | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setSurvey | |
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\Maturity\Model; |
25 | |
26 | use Ramsey\Uuid\Uuid; |
27 | use Ramsey\Uuid\UuidInterface; |
28 | |
29 | class OptionalAnswer |
30 | { |
31 | /** |
32 | * @var UuidInterface |
33 | */ |
34 | private $id; |
35 | |
36 | /** |
37 | * @var string|null |
38 | */ |
39 | private $reason; |
40 | |
41 | /** |
42 | * @var Question|null |
43 | */ |
44 | private $question; |
45 | |
46 | /** |
47 | * @var Survey |
48 | */ |
49 | private $survey; |
50 | |
51 | /** |
52 | * Answer constructor. |
53 | * |
54 | * @throws \Exception |
55 | */ |
56 | public function __construct() |
57 | { |
58 | $this->id = Uuid::uuid4(); |
59 | $this->reason = ''; |
60 | } |
61 | |
62 | public function getId(): UuidInterface |
63 | { |
64 | return $this->id; |
65 | } |
66 | |
67 | public function getReason(): ?string |
68 | { |
69 | return $this->reason; |
70 | } |
71 | |
72 | public function setReason(?string $reason): void |
73 | { |
74 | $this->reason = $reason; |
75 | } |
76 | |
77 | public function getQuestion(): ?Question |
78 | { |
79 | return $this->question; |
80 | } |
81 | |
82 | public function setQuestion(?Question $question): void |
83 | { |
84 | $this->question = $question; |
85 | } |
86 | |
87 | public function getSurvey(): Survey |
88 | { |
89 | return $this->survey; |
90 | } |
91 | |
92 | public function setSurvey(Survey $survey): void |
93 | { |
94 | $this->survey = $survey; |
95 | } |
96 | } |