Completed
Push — main ( fffb13 )
by Laurent
07:05 queued 05:19
created

Contact   A

Complexity

Total Complexity 18

Size/Duplication

Total Lines 286
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 18
lcom 0
cbo 0
dl 0
loc 286
rs 10
c 0
b 0
f 0

18 Methods

Rating   Name   Duplication   Size   Complexity  
A setAddress() 0 6 1
A getAddress() 0 4 1
A setZipcode() 0 6 1
A getZipcode() 0 4 1
A setTown() 0 6 1
A getTown() 0 4 1
A setFax() 0 6 1
A getFax() 0 4 1
A setMail() 0 6 1
A getMail() 0 4 1
A setContact() 0 6 1
A getContact() 0 4 1
A setGsm() 0 6 1
A getGsm() 0 4 1
A setName() 0 6 1
A getName() 0 4 1
A setPhone() 0 6 1
A getPhone() 0 4 1
1
<?php
2
3
/**
4
 * SuperClass Entité Contact.
5
 *
6
 * PHP Version 5
7
 *
8
 * @author    Quétier Laurent <[email protected]>
9
 * @copyright 2014 Dev-Int GLSR
10
 * @license   http://opensource.org/licenses/gpl-license.php GNU Public License
11
 *
12
 * @version GIT: <git_id>
13
 *
14
 * @link https://github.com/Dev-Int/glsr
15
 */
16
namespace AppBundle\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 Entité Contact.
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
    /**
40
     * @var string Addresse de l'entreprise
41
     *
42
     * @ORM\Column(name="address", type="string", length=255)
43
     */
44
    private $address;
45
46
    /**
47
     * @var string Code postal
48
     *
49
     * @ORM\Column(name="zipcode", type="string", length=5)
50
     */
51
    private $zipcode;
52
53
    /**
54
     * @var string Ville
55
     *
56
     * @ORM\Column(name="town", type="string", length=255)
57
     */
58
    private $town;
59
60
    /**
61
     * @var phone_number Téléphone de l'entreprise
62
     *
63
     * @ORM\Column(name="phone", type="phone_number")
64
     * @Assert\NotBlank()
65
     * @AssertPhoneNumber(defaultRegion="FR")
66
     */
67
    private $phone;
68
69
    /**
70
     * @var phone_number Fax de l'entreprise
71
     *
72
     * @ORM\Column(name="fax", type="phone_number")
73
     * @Assert\NotBlank()
74
     * @AssertPhoneNumber(defaultRegion="FR")
75
     */
76
    private $fax;
77
78
    /**
79
     * @var string email de l'entreprise
80
     *
81
     * @ORM\Column(name="mail", type="string", length=255)
82
     * @Assert\NotBlank()
83
     * @Assert\Email(
84
     *     message = "'{{ value }}' n'est pas un email valide.",
85
     *     checkMX = true
86
     * )
87
     */
88
    private $mail;
89
90
    /**
91
     * @var string Contact de l'entreprise
92
     *
93
     * @ORM\Column(name="contact", type="string", length=255)
94
     */
95
    private $contact;
96
97
    /**
98
     * @var phone_number Gsm de l'entreprise
99
     *
100
     * @ORM\Column(name="gsm", type="phone_number")
101
     * @Assert\NotBlank()
102
     * @AssertPhoneNumber(defaultRegion="FR")
103
     */
104
    private $gsm;
105
106
    /**
107
     * Set address
108
     *
109
     * @param string $address
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
     * @return Contact
134
     */
135
    public function setZipcode($zipcode)
136
    {
137
        $this->zipcode = $zipcode;
138
139
        return $this;
140
    }
141
142
    /**
143
     * Get zipcode
144
     *
145
     * @return string
146
     */
147
    public function getZipcode()
148
    {
149
        return $this->zipcode;
150
    }
151
152
    /**
153
     * Set town
154
     *
155
     * @param string $town
156
     * @return Contact
157
     */
158
    public function setTown($town)
159
    {
160
        $this->town = $town;
161
162
        return $this;
163
    }
164
165
    /**
166
     * Get town
167
     *
168
     * @return string
169
     */
170
    public function getTown()
171
    {
172
        return $this->town;
173
    }
174
175
    /**
176
     * Set phone
177
     *
178
     * @param phone_number $phone
179
     * @return Contact
180
     */
181
    public function setPhone($phone)
182
    {
183
        $this->phone = $phone;
184
185
        return $this;
186
    }
187
188
    /**
189
     * Get phone
190
     *
191
     * @return phone_number
192
     */
193
    public function getPhone()
194
    {
195
        return $this->phone;
196
    }
197
198
    /**
199
     * Set fax
200
     *
201
     * @param phone_number $fax
202
     * @return Contact
203
     */
204
    public function setFax($fax)
205
    {
206
        $this->fax = $fax;
207
208
        return $this;
209
    }
210
211
    /**
212
     * Get fax
213
     *
214
     * @return phone_number
215
     */
216
    public function getFax()
217
    {
218
        return $this->fax;
219
    }
220
221
    /**
222
     * Set mail
223
     *
224
     * @param string $mail
225
     * @return Contact
226
     */
227
    public function setMail($mail)
228
    {
229
        $this->mail = $mail;
230
231
        return $this;
232
    }
233
234
    /**
235
     * Get mail
236
     *
237
     * @return string
238
     */
239
    public function getMail()
240
    {
241
        return $this->mail;
242
    }
243
244
    /**
245
     * Set contact
246
     *
247
     * @param string $contact
248
     * @return Contact
249
     */
250
    public function setContact($contact)
251
    {
252
        $this->contact = $contact;
253
254
        return $this;
255
    }
256
257
    /**
258
     * Get contact
259
     *
260
     * @return string
261
     */
262
    public function getContact()
263
    {
264
        return $this->contact;
265
    }
266
267
    /**
268
     * Set gsm
269
     *
270
     * @param phone_number $gsm
271
     *
272
     * @return Contact
273
     */
274
    public function setGsm($gsm)
275
    {
276
        $this->gsm = $gsm;
277
278
        return $this;
279
    }
280
281
    /**
282
     * Get gsm
283
     *
284
     * @return phone_number
285
     */
286
    public function getGsm()
287
    {
288
        return $this->gsm;
289
    }
290
291
    /**
292
     * Set name
293
     *
294
     * @param string $name
295
     *
296
     * @return Contact
297
     */
298
    public function setName($name)
299
    {
300
        $this->name = $name;
301
302
        return $this;
303
    }
304
305
    /**
306
     * Get name
307
     *
308
     * @return string
309
     */
310
    public function getName()
311
    {
312
        return $this->name;
313
    }
314
}
315