Completed
Push — master ( 0d8778...4693cf )
by Derek Stephen
05:55
created

EmailLink   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 97
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 8
c 3
b 0
f 0
lcom 0
cbo 0
dl 0
loc 97
ccs 20
cts 20
cp 1
rs 10

8 Methods

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