Completed
Push — master ( 622106...eab52f )
by Derek Stephen
02:07
created

UserCriteria::setState()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
ccs 0
cts 5
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Del\Criteria;
4
5
use Del\Common\Criteria as CommonCriteria;
6
7
8
class UserCriteria extends CommonCriteria
9
{
10
    const ORDER_EMAIL_ASC        = 'email_asc';
11
    const ORDER_EMAIL_DESC       = 'email_desc';
12
    const ORDER_BEDROOMS            = 'numBedrooms';
13
14
    const ORDER_STATE_ASC        = 'state_asc';
15
    const ORDER_STATE_DESC       = 'state_desc';
16
    const ORDER_STATE            = 'state';
17
18
    const ORDER_REG_DATE_ASC        = 'registrationDate_asc';
19
    const ORDER_REG_DATE_DESC       = 'registrationDate_desc';
20
    const ORDER_REG_DATE            = 'registrationDate';
21
22
    const ORDER_LAST_LOGIN_DATE_ASC        = 'lastLoginDate_asc';
23
    const ORDER_LAST_LOGIN_DATE_DESC       = 'lastLoginDate_desc';
24
    const ORDER_LAST_LOGIN_DATE            = 'lastLoginDate';
25
26
    protected $email;
27
    protected $state;
28
    protected $registrationDate;
29
    protected $lastLoginDate;
30
31
    /**
32
     * @return mixed
33
     */
34
    public function getEmail()
35
    {
36
        return $this->email;
37
    }
38
39
    /**
40
     * @param mixed $email
41
     * @return UserCriteria
42
     */
43
    public function setEmail($email)
44
    {
45
        $this->email = $email;
46
        return $this;
47
    }
48
49
    /**
50
     * @return bool
51
     */
52
    public function hasEmail()
53
    {
54
        return $this->email != null;
55
    }
56
57
    /**
58
     * @return mixed
59
     */
60
    public function getState()
61
    {
62
        return $this->state;
63
    }
64
65
    /**
66
     * @param mixed $state
67
     * @return UserCriteria
68
     */
69
    public function setState($state)
70
    {
71
        $this->state = $state;
72
        return $this;
73
    }
74
75
    /**
76
     * @return bool
77
     */
78
    public function hasState()
79
    {
80
        return $this->state != null;
81
    }
82
83
    /**
84
     * @return mixed
85
     */
86
    public function getRegistrationDate()
87
    {
88
        return $this->registrationDate;
89
    }
90
91
    /**
92
     * @param mixed $registrationDate
93
     * @return UserCriteria
94
     */
95
    public function setRegistrationDate($registrationDate)
96
    {
97
        $this->registrationDate = $registrationDate;
98
        return $this;
99
    }
100
101
    /**
102
     * @return bool
103
     */
104
    public function hasRegistrationDate()
105
    {
106
        return $this->registrationDate != null;
107
    }
108
109
    /**
110
     * @return mixed
111
     */
112
    public function getLastLoginDate()
113
    {
114
        return $this->lastLoginDate;
115
    }
116
117
    /**
118
     * @param mixed $lastLoginDate
119
     * @return UserCriteria
120
     */
121
    public function setLastLoginDate($lastLoginDate)
122
    {
123
        $this->lastLoginDate = $lastLoginDate;
124
        return $this;
125
    }
126
127
    /**
128
     * @return bool
129
     */
130
    public function hasLastLoginDate()
131
    {
132
        return $this->lastLoginDate != null;
133
    }
134
135
136
}