Completed
Push — master ( 2a6a78...c2b2ef )
by DELEVOYE
05:24
created

Subscriber::getZipcode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
/*
4
 * This file is part of the MindbazBundle package.
5
 *
6
 * (c) David DELEVOYE <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Kozikaza\MindbazBundle\Model;
13
14
/**
15
 * @author Vincent Chalamon <[email protected]>
16
 */
17
class Subscriber
18
{
19
    const STATUS_SUBSCRIBED = 0;
20
    const STATUS_UNSUBSCRIBED = 1;
21
    const STATUS_MANUALLY_UNSUBSCRIBED = 2;
22
    const STATUS_DRAINAGE_INVALID_DOMAIN = 3;
23
    const STATUS_DRAINAGE_INVALID_SYNTAX = 4;
24
    const STATUS_DRAINAGE_REPELLERS_LIST = 5;
25
    const STATUS_DRAINAGE_DUPLICATE = 6;
26
    const STATUS_DRAINAGE_NLLAI = 7;
27
    const STATUS_WAITING_REGISTRATION_CONFIRMATION = 8;
28
    const STATUS_SPAM = 9;
29
    const STATUS_WAITING_VALIDATION = 10;
30
    const STATUS_TEST_FAI = 11;
31
    const STATUS_UNSUBSCRIBED_GROUP = 12;
32
33
    const CIVILITY_MR = 0;
34
    const CIVILITY_MRS = 1;
35
    const CIVILITY_MLLE = 2;
36
37
    /**
38
     * @var int
39
     */
40
    private $id;
41
42
    /**
43
     * @var string
44
     */
45
    private $email;
46
47
    /**
48
     * @var \DateTime
49
     */
50
    private $firstSubscriptionDate;
51
52
    /**
53
     * @var \DateTime
54
     */
55
    private $lastSubscriptionDate;
56
57
    /**
58
     * @var \DateTime
59
     */
60
    private $unsubscriptionDate;
61
62
    /**
63
     * @var string
64
     */
65
    private $status = self::STATUS_SUBSCRIBED;
66
67
    /**
68
     * @var string
69
     */
70
    private $civility = self::CIVILITY_MR;
71
72
    /**
73
     * @var string
74
     */
75
    private $lastName;
76
77
    /**
78
     * @var string
79
     */
80
    private $firstName;
81
82
    /**
83
     * @var string
84
     */
85
    private $city;
86
87
    /**
88
     * @var string
89
     */
90
    private $zipcode;
91
92
    /**
93
     * @var string
94
     */
95
    private $country;
96
97
    /**
98
     * @return int
99
     */
100
    public function getId()
101
    {
102
        return $this->id;
103
    }
104
105
    /**
106
     * @param int $id
107
     *
108
     * @return Subscriber
109
     */
110
    public function setId($id)
111
    {
112
        $this->id = $id;
113
114
        return $this;
115
    }
116
117
    /**
118
     * @return string
119
     */
120
    public function getEmail()
121
    {
122
        return $this->email;
123
    }
124
125
    /**
126
     * @param string $email
127
     *
128
     * @return Subscriber
129
     */
130 2
    public function setEmail($email)
131
    {
132 2
        $this->email = strtolower($email);
133
134 2
        return $this;
135
    }
136
137
    /**
138
     * @return \DateTime
139
     */
140
    public function getFirstSubscriptionDate()
141
    {
142
        return $this->firstSubscriptionDate;
143
    }
144
145
    /**
146
     * @param \DateTime $firstSubscriptionDate
147
     *
148
     * @return Subscriber
149
     */
150
    public function setFirstSubscriptionDate($firstSubscriptionDate)
151
    {
152
        $this->firstSubscriptionDate = $firstSubscriptionDate;
153
154
        return $this;
155
    }
156
157
    /**
158
     * @return \DateTime
159
     */
160
    public function getLastSubscriptionDate()
161
    {
162
        return $this->lastSubscriptionDate;
163
    }
164
165
    /**
166
     * @param \DateTime $lastSubscriptionDate
167
     *
168
     * @return Subscriber
169
     */
170
    public function setLastSubscriptionDate($lastSubscriptionDate)
171
    {
172
        $this->lastSubscriptionDate = $lastSubscriptionDate;
173
174
        return $this;
175
    }
176
177
    /**
178
     * @return \DateTime
179
     */
180
    public function getUnsubscriptionDate()
181
    {
182
        return $this->unsubscriptionDate;
183
    }
184
185
    /**
186
     * @param \DateTime $unsubscriptionDate
187
     *
188
     * @return Subscriber
189
     */
190
    public function setUnsubscriptionDate($unsubscriptionDate)
191
    {
192
        $this->unsubscriptionDate = $unsubscriptionDate;
193
194
        return $this;
195
    }
196
197
    /**
198
     * @return string
199
     */
200
    public function getStatus()
201
    {
202
        return $this->status;
203
    }
204
205
    /**
206
     * @param string $status
207
     *
208
     * @return Subscriber
209
     */
210
    public function setStatus($status)
211
    {
212
        $this->status = $status;
213
214
        return $this;
215
    }
216
217
    /**
218
     * @return string
219
     */
220
    public function getCivility()
221
    {
222
        return $this->civility;
223
    }
224
225
    /**
226
     * @param string $civility
227
     *
228
     * @return Subscriber
229
     */
230
    public function setCivility($civility)
231
    {
232
        $this->civility = $civility;
233
234
        return $this;
235
    }
236
237
    /**
238
     * @return string
239
     */
240
    public function getLastName()
241
    {
242
        return $this->lastName;
243
    }
244
245
    /**
246
     * @param string $lastName
247
     *
248
     * @return Subscriber
249
     */
250 2
    public function setLastName($lastName)
251
    {
252 2
        $this->lastName = $lastName;
253
254 2
        return $this;
255
    }
256
257
    /**
258
     * @return string
259
     */
260
    public function getFirstName()
261
    {
262
        return $this->firstName;
263
    }
264
265
    /**
266
     * @param string $firstName
267
     *
268
     * @return Subscriber
269
     */
270 2
    public function setFirstName($firstName)
271
    {
272 2
        $this->firstName = $firstName;
273
274 2
        return $this;
275
    }
276
277
    /**
278
     * @return string
279
     */
280
    public function getCity()
281
    {
282
        return $this->city;
283
    }
284
285
    /**
286
     * @param string $city
287
     *
288
     * @return Subscriber
289
     */
290
    public function setCity($city)
291
    {
292
        $this->city = $city;
293
294
        return $this;
295
    }
296
297
    /**
298
     * @return string
299
     */
300
    public function getZipcode()
301
    {
302
        return $this->zipcode;
303
    }
304
305
    /**
306
     * @param string $zipcode
307
     *
308
     * @return Subscriber
309
     */
310
    public function setZipcode($zipcode)
311
    {
312
        $this->zipcode = $zipcode;
313
314
        return $this;
315
    }
316
317
    /**
318
     * @return string
319
     */
320
    public function getCountry()
321
    {
322
        return $this->country;
323
    }
324
325
    /**
326
     * @param string $country
327
     *
328
     * @return Subscriber
329
     */
330
    public function setCountry($country)
331
    {
332
        $this->country = $country;
333
334
        return $this;
335
    }
336
}
337