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

UserCriteria::hasRegistrationDate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
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
}