Completed
Push — master ( a5514d...03f81b )
by Derek Stephen
01:53
created

PersonCriteria::setFirstname()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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