GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( a34f50...45667e )
by Luis Ramón
02:54
created

Person::setTokenValidity()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
/*
3
  ÁTICA - Aplicación web para la gestión documental de centros educativos
4
5
  Copyright (C) 2015-2016: Luis Ramón López López
6
7
  This program is free software: you can redistribute it and/or modify
8
  it under the terms of the GNU Affero General Public License as published by
9
  the Free Software Foundation, either version 3 of the License, or
10
  (at your option) any later version.
11
12
  This program is distributed in the hope that it will be useful,
13
  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
  GNU Affero General Public License for more details.
16
17
  You should have received a copy of the GNU Affero General Public License
18
  along with this program.  If not, see [http://www.gnu.org/licenses/].
19
*/
20
21
namespace AppBundle\Entity;
22
23
use Doctrine\ORM\Mapping as ORM;
24
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
25
use Symfony\Component\Validator\Constraints as Assert;
26
27
/**
28
 * @ORM\Entity
29
 * @UniqueEntity("email")
30
 */
31
class Person
32
{
33
    const GENDER_UNKNOWN = 0;
34
    const GENDER_MALE = 1;
35
    const GENDER_FEMALE = 2;
36
37
    /**
38
     * @ORM\Id
39
     * @ORM\Column(type="integer")
40
     * @ORM\GeneratedValue
41
     * @var int
42
     */
43
    protected $id;
44
45
    /**
46
     * @ORM\Column(type="string", unique=true, nullable=true)
47
     * @var string
48
     */
49
    protected $reference;
50
51
    /**
52
     * @ORM\Column(type="string")
53
     * @Assert\NotBlank()
54
     * @var string
55
     */
56
    protected $firstName;
57
58
    /**
59
     * @ORM\Column(type="string")
60
     * @Assert\NotBlank()
61
     * @var string
62
     */
63
    protected $lastName;
64
65
    /**
66
     * @ORM\Column(type="integer")
67
     * @var int
68
     */
69
    protected $gender;
70
71
    /**
72
     * @ORM\Column(type="string")
73
     * @var string
74
     */
75
    protected $displayName;
76
77
    /**
78
     * @ORM\Column(type="string", nullable=true)
79
     * @var string
80
     */
81
    protected $initials;
82
83
    /**
84
     * @ORM\OneToOne(targetEntity="User", mappedBy="person")
85
     * @var User
86
     */
87
    protected $user;
88
89
    /**
90
     * @ORM\Column(type="string", nullable=true)
91
     * @var string
92
     */
93
    protected $address;
94
95
    /**
96
     * @ORM\Column(type="string", nullable=true)
97
     * @var string
98
     */
99
    protected $city;
100
101
    /**
102
     * @ORM\Column(type="string", nullable=true)
103
     * @var string
104
     */
105
    protected $province;
106
107
    /**
108
     * @ORM\Column(type="string", nullable=true)
109
     * @var string
110
     */
111
    protected $zipCode;
112
113
    /**
114
     * @ORM\Column(type="string", nullable=true)
115
     * @var string
116
     */
117
    protected $phoneNumber;
118
119
    /**
120
     * @ORM\Column(type="string", unique=true, nullable=true)
121
     * @Assert\Email()
122
     * @var string
123
     */
124
    protected $email;
125
126
    /**
127
     * @ORM\Column(type="string", nullable=true)
128
     * @var string
129
     */
130
    protected $token;
131
132
    /**
133
     * @ORM\Column(type="datetime", nullable=true)
134
     * @var \DateTime
135
     */
136
    protected $tokenValidity;
137
138
    /**
139
     * Get id
140
     *
141
     * @return integer
142
     */
143
    public function getId()
144
    {
145
        return $this->id;
146
    }
147
148
    /**
149
     * Returns the person's display name
150
     *
151
     * @return string
152
     */
153
    public function __toString()
154
    {
155
        return $this->getDisplayName();
156
    }
157
158
    /**
159
     * Set reference
160
     *
161
     * @param string $reference
162
     *
163
     * @return Person
164
     */
165
    public function setReference($reference)
166
    {
167
        $this->reference = $reference;
168
169
        return $this;
170
    }
171
172
    /**
173
     * Get reference
174
     *
175
     * @return string
176
     */
177
    public function getReference()
178
    {
179
        return $this->reference;
180
    }
181
182
    /**
183
     * Set firstName
184
     *
185
     * @param string $firstName
186
     *
187
     * @return Person
188
     */
189
    public function setFirstName($firstName)
190
    {
191
        $this->firstName = $firstName;
192
193
        return $this;
194
    }
195
196
    /**
197
     * Get firstName
198
     *
199
     * @return string
200
     */
201
    public function getFirstName()
202
    {
203
        return $this->firstName;
204
    }
205
206
    /**
207
     * Set lastName
208
     *
209
     * @param string $lastName
210
     *
211
     * @return Person
212
     */
213
    public function setLastName($lastName)
214
    {
215
        $this->lastName = $lastName;
216
217
        return $this;
218
    }
219
220
    /**
221
     * Get lastName
222
     *
223
     * @return string
224
     */
225
    public function getLastName()
226
    {
227
        return $this->lastName;
228
    }
229
230
    /**
231
     * Set gender
232
     *
233
     * @param integer $gender
234
     *
235
     * @return Person
236
     */
237
    public function setGender($gender)
238
    {
239
        $this->gender = $gender;
240
241
        return $this;
242
    }
243
244
    /**
245
     * Get gender
246
     *
247
     * @return integer
248
     */
249
    public function getGender()
250
    {
251
        return $this->gender;
252
    }
253
254
    /**
255
     * Set displayName
256
     *
257
     * @param string $displayName
258
     *
259
     * @return Person
260
     */
261
    public function setDisplayName($displayName)
262
    {
263
        $this->displayName = $displayName;
264
265
        return $this;
266
    }
267
268
    /**
269
     * Get displayName
270
     *
271
     * @return string
272
     */
273
    public function getDisplayName()
274
    {
275
        return $this->displayName;
276
    }
277
278
    /**
279
     * Set initials
280
     *
281
     * @param string $initials
282
     *
283
     * @return Person
284
     */
285
    public function setInitials($initials)
286
    {
287
        $this->initials = $initials;
288
289
        return $this;
290
    }
291
292
    /**
293
     * Get initials
294
     *
295
     * @return string
296
     */
297
    public function getInitials()
298
    {
299
        return $this->initials;
300
    }
301
302
    /**
303
     * Set user
304
     *
305
     * @param User $user
306
     *
307
     * @return Person
308
     */
309
    public function setUser(User $user = null)
310
    {
311
        $this->user = $user;
312
313
        return $this;
314
    }
315
316
    /**
317
     * Get user
318
     *
319
     * @return User
320
     */
321
    public function getUser()
322
    {
323
        return $this->user;
324
    }
325
326
    /**
327
     * Set address
328
     *
329
     * @param string $address
330
     *
331
     * @return Person
332
     */
333
    public function setAddress($address)
334
    {
335
        $this->address = $address;
336
337
        return $this;
338
    }
339
340
    /**
341
     * Get address
342
     *
343
     * @return string
344
     */
345
    public function getAddress()
346
    {
347
        return $this->address;
348
    }
349
350
    /**
351
     * Set city
352
     *
353
     * @param string $city
354
     *
355
     * @return Person
356
     */
357
    public function setCity($city)
358
    {
359
        $this->city = $city;
360
361
        return $this;
362
    }
363
364
    /**
365
     * Get city
366
     *
367
     * @return string
368
     */
369
    public function getCity()
370
    {
371
        return $this->city;
372
    }
373
374
    /**
375
     * Set province
376
     *
377
     * @param string $province
378
     *
379
     * @return Person
380
     */
381
    public function setProvince($province)
382
    {
383
        $this->province = $province;
384
385
        return $this;
386
    }
387
388
    /**
389
     * Get province
390
     *
391
     * @return string
392
     */
393
    public function getProvince()
394
    {
395
        return $this->province;
396
    }
397
398
    /**
399
     * Set zipCode
400
     *
401
     * @param string $zipCode
402
     *
403
     * @return Person
404
     */
405
    public function setZipCode($zipCode)
406
    {
407
        $this->zipCode = $zipCode;
408
409
        return $this;
410
    }
411
412
    /**
413
     * Get zipCode
414
     *
415
     * @return string
416
     */
417
    public function getZipCode()
418
    {
419
        return $this->zipCode;
420
    }
421
422
    /**
423
     * Set phoneNumber
424
     *
425
     * @param string $phoneNumber
426
     *
427
     * @return Person
428
     */
429
    public function setPhoneNumber($phoneNumber)
430
    {
431
        $this->phoneNumber = $phoneNumber;
432
433
        return $this;
434
    }
435
436
    /**
437
     * Get phoneNumber
438
     *
439
     * @return string
440
     */
441
    public function getPhoneNumber()
442
    {
443
        return $this->phoneNumber;
444
    }
445
446
447
    /**
448
     * Get email
449
     *
450
     * @return string
451
     */
452
    public function getEmail()
453
    {
454
        return $this->email;
455
    }
456
457
    /**
458
     * Set email
459
     *
460
     * @param string $email
461
     *
462
     * @return Person
463
     */
464
    public function setEmail($email)
465
    {
466
        $this->email = $email;
467
468
        return $this;
469
    }
470
471
    /**
472
     * Set token
473
     *
474
     * @param string $token
475
     *
476
     * @return Person
477
     */
478
    public function setToken($token)
479
    {
480
        $this->token = $token;
481
482
        return $this;
483
    }
484
485
    /**
486
     * Get token
487
     *
488
     * @return string
489
     */
490
    public function getToken()
491
    {
492
        return $this->token;
493
    }
494
495
    /**
496
     * Set tokenValidity
497
     *
498
     * @param \DateTime $tokenValidity
499
     *
500
     * @return Person
501
     */
502
    public function setTokenValidity($tokenValidity)
503
    {
504
        $this->tokenValidity = $tokenValidity;
505
506
        return $this;
507
    }
508
509
    /**
510
     * Get tokenValidity
511
     *
512
     * @return \DateTime
513
     */
514
    public function getTokenValidity()
515
    {
516
        return $this->tokenValidity;
517
    }
518
}
519