EmailLink   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 89
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 1
Metric Value
eloc 13
c 3
b 0
f 1
dl 0
loc 89
ccs 16
cts 16
cp 1
rs 10
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A setToken() 0 3 1
A getToken() 0 3 1
A getUser() 0 3 1
A setId() 0 3 1
A setExpiryDate() 0 3 1
A setUser() 0 3 1
A getExpiryDate() 0 3 1
A getId() 0 3 1
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