Completed
Push — master ( 566b8a...9b14fc )
by Derek Stephen
01:55
created

PersonCriteria::setId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Del\Person\Criteria;
4
5
use Del\Common\Criteria as CommonCriteria;
6
7
8
class PersonCriteria extends CommonCriteria
0 ignored issues
show
Deprecated Code introduced by
The class Del\Common\Criteria has been deprecated with message: use Del\Common\Criteria\AbstractCriteria

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
9
{
10
    const ORDER_FIRSTNAME = 'firstname';
11
    const ORDER_MIDDLENAME = 'middlename';
12
    const ORDER_LASTNAME = 'state';
13
    const ORDER_AKA = 'aka';
14
    const ORDER_BIRTHPLACE = 'birthplace';
15
    const ORDER_COUNTRY = 'country';
16
    const ORDER_DOB = 'dob';
17
18
    protected $id;
19
    protected $firstname;
20
    protected $middlename;
21
    protected $lastname;
22
    protected $aka;
23
    protected $birthplace;
24
    protected $country;
25
    protected $dob;
26
27
    /**
28
     * @return int
29
     */
30 1
    public function getId()
31
    {
32 1
        return $this->id;
33
    }
34
35
    /**
36
     * @param $id
37
     * @return $this
38
     */
39 1
    public function setId($id)
40
    {
41 1
        $this->id = (int)$id;
42 1
        return $this;
43
    }
44
45
    /**
46
     * @return bool
47
     */
48 1
    public function hasId()
49
    {
50 1
        return $this->id != null;
51
    }
52
53
    /**
54
     * @return string|null
55
     */
56 1
    public function getFirstname()
57
    {
58 1
        return $this->firstname;
59
    }
60
61
    /**
62
     * @param string $firstname
63
     * @return PersonCriteria
64
     */
65 1
    public function setFirstname($firstname)
66
    {
67 1
        $this->firstname = $firstname;
68 1
        return $this;
69
    }
70
71
    /**
72
     * @return bool
73
     */
74 1
    public function hasFirstname()
75
    {
76 1
        return $this->firstname != null;
77
    }
78
79
    /**
80
     * @return mixed
81
     */
82 1
    public function getMiddlename()
83
    {
84 1
        return $this->middlename;
85
    }
86
87
    /**
88
     * @param mixed $middlename
89
     * @return PersonCriteria
90
     */
91 1
    public function setMiddlename($middlename)
92
    {
93 1
        $this->middlename = $middlename;
94 1
        return $this;
95
    }
96
97
    /**
98
     * @return bool
99
     */
100 1
    public function hasMiddlename()
101
    {
102 1
        return $this->middlename != null;
103
    }
104
105
    /**
106
     * @return mixed
107
     */
108 1
    public function getLastname()
109
    {
110 1
        return $this->lastname;
111
    }
112
113
    /**
114
     * @param mixed $lastname
115
     * @return PersonCriteria
116
     */
117 1
    public function setLastname($lastname)
118
    {
119 1
        $this->lastname = $lastname;
120 1
        return $this;
121
    }
122
123
    /**
124
     * @return bool
125
     */
126 1
    public function hasLastname()
127
    {
128 1
        return $this->lastname != null;
129
    }
130
131
    /**
132
     * @return mixed
133
     */
134 1
    public function getAka()
135
    {
136 1
        return $this->aka;
137
    }
138
139
    /**
140
     * @param mixed $aka
141
     * @return PersonCriteria
142
     */
143 1
    public function setAka($aka)
144
    {
145 1
        $this->aka = $aka;
146 1
        return $this;
147
    }
148
149
    /**
150
     * @return bool
151
     */
152 1
    public function hasAka()
153
    {
154 1
        return $this->aka != null;
155
    }
156
157
    /**
158
     * @return mixed
159
     */
160 1
    public function getBirthplace()
161
    {
162 1
        return $this->birthplace;
163
    }
164
165
    /**
166
     * @param mixed $birthplace
167
     * @return PersonCriteria
168
     */
169 1
    public function setBirthplace($birthplace)
170
    {
171 1
        $this->birthplace = $birthplace;
172 1
        return $this;
173
    }
174
175
    /**
176
     * @return bool
177
     */
178 1
    public function hasBirthplace()
179
    {
180 1
        return $this->birthplace != null;
181
    }
182
183
    /**
184
     * @return mixed
185
     */
186 1
    public function getCountry()
187
    {
188 1
        return $this->country;
189
    }
190
191
    /**
192
     * @param mixed $country
193
     * @return PersonCriteria
194
     */
195 1
    public function setCountry($country)
196
    {
197 1
        $this->country = $country;
198 1
        return $this;
199
    }
200
201
    /**
202
     * @return bool
203
     */
204 1
    public function hasCountry()
205
    {
206 1
        return $this->country != null;
207
    }
208
209
    /**
210
     * @return mixed
211
     */
212 1
    public function getDob()
213
    {
214 1
        return $this->dob;
215
    }
216
217
    /**
218
     * @param mixed $dob
219
     * @return PersonCriteria
220
     */
221 1
    public function setDob($dob)
222
    {
223 1
        $this->dob = $dob;
224 1
        return $this;
225
    }
226
227
    /**
228
     * @return bool
229
     */
230 1
    public function hasDob()
231
    {
232 1
        return $this->dob != null;
233
    }
234
}