|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* SuperClass Entity Contact. |
|
4
|
|
|
* |
|
5
|
|
|
* PHP Version 7 |
|
6
|
|
|
* |
|
7
|
|
|
* @author Quétier Laurent <[email protected]> |
|
8
|
|
|
* @copyright 2018 Dev-Int GLSR |
|
9
|
|
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License |
|
10
|
|
|
* |
|
11
|
|
|
* @version GIT: $Id$ |
|
12
|
|
|
* |
|
13
|
|
|
* @see https://github.com/Dev-Int/glsr |
|
14
|
|
|
*/ |
|
15
|
|
|
|
|
16
|
|
|
namespace App\Entity; |
|
17
|
|
|
|
|
18
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
19
|
|
|
use Misd\PhoneNumberBundle\Validator\Constraints\PhoneNumber as AssertPhoneNumber; |
|
20
|
|
|
use Symfony\Component\Validator\Constraints as Assert; |
|
21
|
|
|
|
|
22
|
|
|
/** |
|
23
|
|
|
* Contact Entity. |
|
24
|
|
|
* |
|
25
|
|
|
* @category Entity |
|
26
|
|
|
* |
|
27
|
|
|
* @ORM\MappedSuperclass |
|
28
|
|
|
*/ |
|
29
|
|
|
class Contact |
|
30
|
|
|
{ |
|
31
|
|
|
/** |
|
32
|
|
|
* @var string name nom de l'entreprise |
|
33
|
|
|
* |
|
34
|
|
|
* @ORM\Column(name="name", type="string", length=255) |
|
35
|
|
|
*/ |
|
36
|
|
|
private $name; |
|
37
|
|
|
|
|
38
|
|
|
/** |
|
39
|
|
|
* @var string Addresse de l'entreprise |
|
40
|
|
|
* |
|
41
|
|
|
* @ORM\Column(name="address", type="string", length=255) |
|
42
|
|
|
*/ |
|
43
|
|
|
private $address; |
|
44
|
|
|
|
|
45
|
|
|
/** |
|
46
|
|
|
* @var string Code postal |
|
47
|
|
|
* |
|
48
|
|
|
* @ORM\Column(name="zipcode", type="string", length=5) |
|
49
|
|
|
*/ |
|
50
|
|
|
private $zipcode; |
|
51
|
|
|
|
|
52
|
|
|
/** |
|
53
|
|
|
* @var string Ville |
|
54
|
|
|
* |
|
55
|
|
|
* @ORM\Column(name="town", type="string", length=255) |
|
56
|
|
|
*/ |
|
57
|
|
|
private $town; |
|
58
|
|
|
|
|
59
|
|
|
/** |
|
60
|
|
|
* @var phone_number Téléphone de l'entreprise |
|
|
|
|
|
|
61
|
|
|
* |
|
62
|
|
|
* @ORM\Column(name="phone", type="phone_number") |
|
63
|
|
|
* @Assert\NotBlank() |
|
64
|
|
|
* @AssertPhoneNumber(defaultRegion="FR") |
|
65
|
|
|
*/ |
|
66
|
|
|
private $phone; |
|
67
|
|
|
|
|
68
|
|
|
/** |
|
69
|
|
|
* @var phone_number Fax de l'entreprise |
|
70
|
|
|
* |
|
71
|
|
|
* @ORM\Column(name="fax", type="phone_number") |
|
72
|
|
|
* @Assert\NotBlank() |
|
73
|
|
|
* @AssertPhoneNumber(defaultRegion="FR") |
|
74
|
|
|
*/ |
|
75
|
|
|
private $fax; |
|
76
|
|
|
|
|
77
|
|
|
/** |
|
78
|
|
|
* @var string email de l'entreprise |
|
79
|
|
|
* |
|
80
|
|
|
* @ORM\Column(name="mail", type="string", length=255) |
|
81
|
|
|
* @Assert\NotBlank() |
|
82
|
|
|
* @Assert\Email( |
|
83
|
|
|
* message = "'{{ value }}' n'est pas un email valide.", |
|
84
|
|
|
* checkMX = true |
|
85
|
|
|
* ) |
|
86
|
|
|
*/ |
|
87
|
|
|
private $email; |
|
88
|
|
|
|
|
89
|
|
|
/** |
|
90
|
|
|
* @var string Contact de l'entreprise |
|
91
|
|
|
* |
|
92
|
|
|
* @ORM\Column(name="contact", type="string", length=255) |
|
93
|
|
|
*/ |
|
94
|
|
|
private $contact; |
|
95
|
|
|
|
|
96
|
|
|
/** |
|
97
|
|
|
* @var phone_number Gsm de l'entreprise |
|
98
|
|
|
* |
|
99
|
|
|
* @ORM\Column(name="gsm", type="phone_number") |
|
100
|
|
|
* @Assert\NotBlank() |
|
101
|
|
|
* @AssertPhoneNumber(defaultRegion="FR") |
|
102
|
|
|
*/ |
|
103
|
|
|
private $gsm; |
|
104
|
|
|
|
|
105
|
|
|
/** |
|
106
|
|
|
* Set address. |
|
107
|
|
|
* |
|
108
|
|
|
* @param string $address |
|
109
|
|
|
* |
|
110
|
|
|
* @return Contact |
|
111
|
|
|
*/ |
|
112
|
|
|
public function setAddress($address) |
|
113
|
|
|
{ |
|
114
|
|
|
$this->address = $address; |
|
115
|
|
|
|
|
116
|
|
|
return $this; |
|
117
|
|
|
} |
|
118
|
|
|
|
|
119
|
|
|
/** |
|
120
|
|
|
* Get address. |
|
121
|
|
|
* |
|
122
|
|
|
* @return string |
|
123
|
|
|
*/ |
|
124
|
|
|
public function getAddress() |
|
125
|
|
|
{ |
|
126
|
|
|
return $this->address; |
|
127
|
|
|
} |
|
128
|
|
|
|
|
129
|
|
|
/** |
|
130
|
|
|
* Set zipcode. |
|
131
|
|
|
* |
|
132
|
|
|
* @param string $zipcode |
|
133
|
|
|
* |
|
134
|
|
|
* @return Contact |
|
135
|
|
|
*/ |
|
136
|
|
|
public function setZipcode($zipcode) |
|
137
|
|
|
{ |
|
138
|
|
|
$this->zipcode = $zipcode; |
|
139
|
|
|
|
|
140
|
|
|
return $this; |
|
141
|
|
|
} |
|
142
|
|
|
|
|
143
|
|
|
/** |
|
144
|
|
|
* Get zipcode. |
|
145
|
|
|
* |
|
146
|
|
|
* @return string |
|
147
|
|
|
*/ |
|
148
|
|
|
public function getZipcode() |
|
149
|
|
|
{ |
|
150
|
|
|
return $this->zipcode; |
|
151
|
|
|
} |
|
152
|
|
|
|
|
153
|
|
|
/** |
|
154
|
|
|
* Set town. |
|
155
|
|
|
* |
|
156
|
|
|
* @param string $town |
|
157
|
|
|
* |
|
158
|
|
|
* @return Contact |
|
159
|
|
|
*/ |
|
160
|
|
|
public function setTown($town) |
|
161
|
|
|
{ |
|
162
|
|
|
$this->town = strtoupper($town); |
|
163
|
|
|
|
|
164
|
|
|
return $this; |
|
165
|
|
|
} |
|
166
|
|
|
|
|
167
|
|
|
/** |
|
168
|
|
|
* Get town. |
|
169
|
|
|
* |
|
170
|
|
|
* @return string |
|
171
|
|
|
*/ |
|
172
|
|
|
public function getTown() |
|
173
|
|
|
{ |
|
174
|
|
|
return $this->town; |
|
175
|
|
|
} |
|
176
|
|
|
|
|
177
|
|
|
/** |
|
178
|
|
|
* Set phone. |
|
179
|
|
|
* |
|
180
|
|
|
* @param phone_number $phone |
|
181
|
|
|
* |
|
182
|
|
|
* @return Contact |
|
183
|
|
|
*/ |
|
184
|
|
|
public function setPhone($phone) |
|
185
|
|
|
{ |
|
186
|
|
|
$this->phone = $phone; |
|
187
|
|
|
|
|
188
|
|
|
return $this; |
|
189
|
|
|
} |
|
190
|
|
|
|
|
191
|
|
|
/** |
|
192
|
|
|
* Get phone. |
|
193
|
|
|
* |
|
194
|
|
|
* @return phone_number |
|
195
|
|
|
*/ |
|
196
|
|
|
public function getPhone() |
|
197
|
|
|
{ |
|
198
|
|
|
return $this->phone; |
|
199
|
|
|
} |
|
200
|
|
|
|
|
201
|
|
|
/** |
|
202
|
|
|
* Set fax. |
|
203
|
|
|
* |
|
204
|
|
|
* @param phone_number $fax |
|
205
|
|
|
* |
|
206
|
|
|
* @return Contact |
|
207
|
|
|
*/ |
|
208
|
|
|
public function setFax($fax) |
|
209
|
|
|
{ |
|
210
|
|
|
$this->fax = $fax; |
|
211
|
|
|
|
|
212
|
|
|
return $this; |
|
213
|
|
|
} |
|
214
|
|
|
|
|
215
|
|
|
/** |
|
216
|
|
|
* Get fax. |
|
217
|
|
|
* |
|
218
|
|
|
* @return phone_number |
|
219
|
|
|
*/ |
|
220
|
|
|
public function getFax() |
|
221
|
|
|
{ |
|
222
|
|
|
return $this->fax; |
|
223
|
|
|
} |
|
224
|
|
|
|
|
225
|
|
|
/** |
|
226
|
|
|
* Set email. |
|
227
|
|
|
* |
|
228
|
|
|
* @param string $email |
|
229
|
|
|
* |
|
230
|
|
|
* @return Contact |
|
231
|
|
|
*/ |
|
232
|
|
|
public function setEmail($email) |
|
233
|
|
|
{ |
|
234
|
|
|
$this->email = $email; |
|
235
|
|
|
|
|
236
|
|
|
return $this; |
|
237
|
|
|
} |
|
238
|
|
|
|
|
239
|
|
|
/** |
|
240
|
|
|
* Get email. |
|
241
|
|
|
* |
|
242
|
|
|
* @return string |
|
243
|
|
|
*/ |
|
244
|
|
|
public function getEmail() |
|
245
|
|
|
{ |
|
246
|
|
|
return $this->email; |
|
247
|
|
|
} |
|
248
|
|
|
|
|
249
|
|
|
/** |
|
250
|
|
|
* Set contact. |
|
251
|
|
|
* |
|
252
|
|
|
* @param string $contact |
|
253
|
|
|
* |
|
254
|
|
|
* @return Contact |
|
255
|
|
|
*/ |
|
256
|
|
|
public function setContact($contact) |
|
257
|
|
|
{ |
|
258
|
|
|
$this->contact = $contact; |
|
259
|
|
|
|
|
260
|
|
|
return $this; |
|
261
|
|
|
} |
|
262
|
|
|
|
|
263
|
|
|
/** |
|
264
|
|
|
* Get contact. |
|
265
|
|
|
* |
|
266
|
|
|
* @return string |
|
267
|
|
|
*/ |
|
268
|
|
|
public function getContact() |
|
269
|
|
|
{ |
|
270
|
|
|
return $this->contact; |
|
271
|
|
|
} |
|
272
|
|
|
|
|
273
|
|
|
/** |
|
274
|
|
|
* Set gsm. |
|
275
|
|
|
* |
|
276
|
|
|
* @param phone_number $gsm |
|
277
|
|
|
* |
|
278
|
|
|
* @return Contact |
|
279
|
|
|
*/ |
|
280
|
|
|
public function setGsm($gsm) |
|
281
|
|
|
{ |
|
282
|
|
|
$this->gsm = $gsm; |
|
283
|
|
|
|
|
284
|
|
|
return $this; |
|
285
|
|
|
} |
|
286
|
|
|
|
|
287
|
|
|
/** |
|
288
|
|
|
* Get gsm. |
|
289
|
|
|
* |
|
290
|
|
|
* @return phone_number |
|
291
|
|
|
*/ |
|
292
|
|
|
public function getGsm() |
|
293
|
|
|
{ |
|
294
|
|
|
return $this->gsm; |
|
295
|
|
|
} |
|
296
|
|
|
|
|
297
|
|
|
/** |
|
298
|
|
|
* Set name. |
|
299
|
|
|
* |
|
300
|
|
|
* @param string $name |
|
301
|
|
|
* |
|
302
|
|
|
* @return Contact |
|
303
|
|
|
*/ |
|
304
|
|
|
public function setName($name) |
|
305
|
|
|
{ |
|
306
|
|
|
$this->name = $name; |
|
307
|
|
|
|
|
308
|
|
|
return $this; |
|
309
|
|
|
} |
|
310
|
|
|
|
|
311
|
|
|
/** |
|
312
|
|
|
* Get name. |
|
313
|
|
|
* |
|
314
|
|
|
* @return string |
|
315
|
|
|
*/ |
|
316
|
|
|
public function getName() |
|
317
|
|
|
{ |
|
318
|
|
|
return $this->name; |
|
319
|
|
|
} |
|
320
|
|
|
|
|
321
|
|
|
/** |
|
322
|
|
|
* Get complete address. |
|
323
|
|
|
* |
|
324
|
|
|
* @return string |
|
325
|
|
|
*/ |
|
326
|
|
|
public function getCompleteAddress() |
|
327
|
|
|
{ |
|
328
|
|
|
return $this->address.'<br>'.$this->zipcode.' '.$this->town; |
|
329
|
|
|
} |
|
330
|
|
|
} |
|
331
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths