Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
46.67% |
7 / 15 |
|
46.67% |
7 / 15 |
CRAP | |
0.00% |
0 / 1 |
Contact | |
46.67% |
7 / 15 |
|
46.67% |
7 / 15 |
49.13 | |
0.00% |
0 / 1 |
getCivility | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setCivility | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getFirstName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setFirstName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getLastName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setLastName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getFullName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getJob | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setJob | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getMail | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setMail | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getPhoneNumber | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setPhoneNumber | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getNotification | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setNotification | |
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\User\Model\Embeddable; |
25 | |
26 | class Contact |
27 | { |
28 | /** |
29 | * @var string|null |
30 | */ |
31 | private $civility; |
32 | |
33 | /** |
34 | * @var string|null |
35 | */ |
36 | private $firstName; |
37 | |
38 | /** |
39 | * @var string|null |
40 | */ |
41 | private $lastName; |
42 | |
43 | /** |
44 | * @var string|null |
45 | */ |
46 | private $job; |
47 | |
48 | /** |
49 | * @var string|null |
50 | */ |
51 | private $mail; |
52 | |
53 | /** |
54 | * @var string|null |
55 | */ |
56 | private $phoneNumber; |
57 | |
58 | /** |
59 | * @var bool |
60 | */ |
61 | private $notification = false; |
62 | |
63 | public function getCivility(): ?string |
64 | { |
65 | return $this->civility; |
66 | } |
67 | |
68 | public function setCivility(?string $civility): void |
69 | { |
70 | $this->civility = $civility; |
71 | } |
72 | |
73 | public function getFirstName(): ?string |
74 | { |
75 | return $this->firstName; |
76 | } |
77 | |
78 | public function setFirstName(?string $firstName): void |
79 | { |
80 | $this->firstName = $firstName; |
81 | } |
82 | |
83 | public function getLastName(): ?string |
84 | { |
85 | return $this->lastName; |
86 | } |
87 | |
88 | public function setLastName(?string $lastName): void |
89 | { |
90 | $this->lastName = $lastName; |
91 | } |
92 | |
93 | public function getFullName(): string |
94 | { |
95 | return "{$this->firstName} {$this->lastName}"; |
96 | } |
97 | |
98 | public function getJob(): ?string |
99 | { |
100 | return $this->job; |
101 | } |
102 | |
103 | public function setJob(?string $job): void |
104 | { |
105 | $this->job = $job; |
106 | } |
107 | |
108 | public function getMail(): ?string |
109 | { |
110 | return $this->mail; |
111 | } |
112 | |
113 | public function setMail(?string $mail): void |
114 | { |
115 | $this->mail = $mail; |
116 | } |
117 | |
118 | public function getPhoneNumber(): ?string |
119 | { |
120 | return $this->phoneNumber; |
121 | } |
122 | |
123 | public function setPhoneNumber(?string $phoneNumber): void |
124 | { |
125 | $this->phoneNumber = $phoneNumber; |
126 | } |
127 | |
128 | public function getNotification(): ?bool |
129 | { |
130 | return $this->notification; |
131 | } |
132 | |
133 | public function setNotification(?bool $notification): void |
134 | { |
135 | $this->notification = $notification; |
136 | } |
137 | } |