EmailLink::getExpiryDate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
namespace Del\Entity;
4
5
use DateTime;
6
use Doctrine\ORM\Mapping as ORM;
7
8
/**
9
 * @ORM\Entity(repositoryClass="Del\Repository\EmailLink")
10
 */
11
class EmailLink
12
{
13
    /**
14
     * @ORM\Id
15
     * @ORM\Column(type="integer")
16
     * @ORM\GeneratedValue
17
     */
18
    private $id;
19
20
    /**
21
     *  @ORM\ManyToOne(targetEntity="Del\Entity\User",cascade={"persist"})
22
     */
23
    private $user;
24
25
    /**
26
     * @ORM\Column(type="datetime")
27
     */
28
    private $expiry_date;
29
30
    /**
31
     * @ORM\Column(type="string")
32
     */
33
    private $token;
34
35
    /**
36
     * @return int
37
     */
38 1
    public function getId(): int
39
    {
40 1
        return $this->id;
41
    }
42
43
    /**
44
     * @param int $id
45
     */
46 1
    public function setId(int $id): void
47
    {
48 1
        $this->id = $id;
49
    }
50
51
    /**
52
     * @return UserInterface
53
     */
54 4
    public function getUser(): UserInterface
55
    {
56 4
        return $this->user;
57
    }
58
59
    /**
60
     * @param UserInterface $user
61
     * @return EmailLink
62
     */
63 26
    public function setUser(UserInterface $user): void
64
    {
65 26
        $this->user = $user;
66
    }
67
68
    /**
69
     * @return DateTime
70
     */
71 3
    public function getExpiryDate(): DateTime
72
    {
73 3
        return $this->expiry_date;
74
    }
75
76
    /**
77
     * @param DateTime $expiry_date
78
     * @return EmailLink
79
     */
80 26
    public function setExpiryDate(DateTime $expiry_date): void
81
    {
82 26
        $this->expiry_date = $expiry_date;
83
    }
84
85
    /**
86
     * @return string
87
     */
88 2
    public function getToken(): string
89
    {
90 2
        return $this->token;
91
    }
92
93
    /**
94
     * @param string $token
95
     * @return EmailLink
96
     */
97 26
    public function setToken(string $token):  void
98
    {
99 26
        $this->token = $token;
100
    }
101
}
102
103
104