Completed
Push — master ( f1d84d...653498 )
by Derek Stephen
03:51
created

UserCriteria   A

Complexity

Total Complexity 15

Size/Duplication

Total Lines 146
Duplicated Lines 0 %

Coupling/Cohesion

Components 5
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 15
lcom 5
cbo 1
dl 0
loc 146
ccs 0
cts 65
cp 0
rs 10
c 0
b 0
f 0

15 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 4 1
A setId() 0 5 1
A hasId() 0 4 1
A getEmail() 0 4 1
A setEmail() 0 5 1
A hasEmail() 0 4 1
A getState() 0 4 1
A setState() 0 5 1
A hasState() 0 4 1
A getRegistrationDate() 0 4 1
A setRegistrationDate() 0 5 1
A hasRegistrationDate() 0 4 1
A getLastLoginDate() 0 4 1
A setLastLoginDate() 0 5 1
A hasLastLoginDate() 0 4 1
1
<?php
2
3
namespace Del\Criteria;
4
5
use Del\Common\Criteria\AbstractCriteria;
6
7
class UserCriteria extends AbstractCriteria
8
{
9
    const ORDER_ID = 'id';
10
    const ORDER_EMAIL = 'email';
11
    const ORDER_STATE  = 'state';
12
    const ORDER_REG_DATE = 'registrationDate';
13
    const ORDER_LAST_LOGIN_DATE = 'lastLoginDate';
14
15
    protected $id;
16
    protected $email;
17
    protected $state;
18
    protected $registrationDate;
19
    protected $lastLoginDate;
20
21
    /**
22
     * @return int
23
     */
24
    public function getId()
25
    {
26
        return $this->id;
27
    }
28
29
    /**
30
     * @param $id
31
     * @return $this
32
     */
33
    public function setId($id)
34
    {
35
        $this->id = (int) $id;
36
        return $this;
37
    }
38
39
    /**
40
     * @return bool
41
     */
42
    public function hasId()
43
    {
44
        return $this->id != null;
45
    }
46
47
    /**
48
     * @return mixed
49
     */
50
    public function getEmail()
51
    {
52
        return $this->email;
53
    }
54
55
    /**
56
     * @param mixed $email
57
     * @return UserCriteria
58
     */
59
    public function setEmail($email)
60
    {
61
        $this->email = $email;
62
        return $this;
63
    }
64
65
    /**
66
     * @return bool
67
     */
68
    public function hasEmail()
69
    {
70
        return $this->email != null;
71
    }
72
73
    /**
74
     * @return mixed
75
     */
76
    public function getState()
77
    {
78
        return $this->state;
79
    }
80
81
    /**
82
     * @param mixed $state
83
     * @return UserCriteria
84
     */
85
    public function setState($state)
86
    {
87
        $this->state = $state;
88
        return $this;
89
    }
90
91
    /**
92
     * @return bool
93
     */
94
    public function hasState()
95
    {
96
        return $this->state != null;
97
    }
98
99
    /**
100
     * @return mixed
101
     */
102
    public function getRegistrationDate()
103
    {
104
        return $this->registrationDate;
105
    }
106
107
    /**
108
     * @param mixed $registrationDate
109
     * @return UserCriteria
110
     */
111
    public function setRegistrationDate($registrationDate)
112
    {
113
        $this->registrationDate = $registrationDate;
114
        return $this;
115
    }
116
117
    /**
118
     * @return bool
119
     */
120
    public function hasRegistrationDate()
121
    {
122
        return $this->registrationDate != null;
123
    }
124
125
    /**
126
     * @return mixed
127
     */
128
    public function getLastLoginDate()
129
    {
130
        return $this->lastLoginDate;
131
    }
132
133
    /**
134
     * @param mixed $lastLoginDate
135
     * @return UserCriteria
136
     */
137
    public function setLastLoginDate($lastLoginDate)
138
    {
139
        $this->lastLoginDate = $lastLoginDate;
140
        return $this;
141
    }
142
143
    /**
144
     * @return bool
145
     */
146
    public function hasLastLoginDate()
147
    {
148
        return $this->lastLoginDate != null;
149
    }
150
151
152
}