Completed
Push — master ( 57422c...12ea5b )
by Gabor
09:15
created

UserEntity::getUserId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * WebHemi.
4
 *
5
 * PHP version 5.6
6
 *
7
 * @copyright 2012 - 2016 Gixx-web (http://www.gixx-web.com)
8
 * @license   https://opensource.org/licenses/MIT The MIT License (MIT)
9
 *
10
 * @link      http://www.gixx-web.com
11
 */
12
namespace WebHemi\DataEntity\User;
13
14
use DateTime;
15
use WebHemi\DataEntity\DataEntityInterface;
16
17
/**
18
 * Class UserEntity.
19
 */
20
class UserEntity implements DataEntityInterface
21
{
22
    /** @var string */
23
    private $userId;
24
    /** @var string */
25
    private $userName;
26
    /** @var string */
27
    private $email;
28
    /** @var string */
29
    private $password;
30
    /** @var string */
31
    private $hash;
32
    /** @var bool */
33
    private $isActive;
34
    /** @var bool */
35
    private $isEnabled;
36
    /** @var DateTime */
37
    private $dateCreated;
38
    /** @var DateTime */
39
    private $dateModified;
40
41
    /**
42
     * @param mixed $userId
43
     *
44
     * @return UserEntity
45
     */
46 6
    public function setUserId($userId)
47
    {
48 6
        $this->userId = $userId;
49
50 6
        return $this;
51
    }
52
53
    /**
54
     * @return string
55
     */
56 2
    public function getUserId()
57
    {
58 2
        return $this->userId;
59
    }
60
61
    /**
62
     * @param string $userName
63
     *
64
     * @return UserEntity
65
     */
66 4
    public function setUserName($userName)
67
    {
68 4
        $this->userName = $userName;
69
70 4
        return $this;
71
    }
72
73
    /**
74
     * @return string
75
     */
76 1
    public function getUserName()
77
    {
78 1
        return $this->userName;
79
    }
80
81
    /**
82
     * @param string $email
83
     *
84
     * @return UserEntity
85
     */
86 4
    public function setEmail($email)
87
    {
88 4
        $this->email = $email;
89
90 4
        return $this;
91
    }
92
93
    /**
94
     * @return string
95
     */
96 1
    public function getEmail()
97
    {
98 1
        return $this->email;
99
    }
100
101
    /**
102
     * @param string $password
103
     *
104
     * @return UserEntity
105
     */
106 4
    public function setPassword($password)
107
    {
108 4
        $this->password = $password;
109
110 4
        return $this;
111
    }
112
113
    /**
114
     * @return string
115
     */
116 3
    public function getPassword()
117
    {
118 3
        return $this->password;
119
    }
120
121
    /**
122
     * @param string $hash
123
     *
124
     * @return UserEntity
125
     */
126 4
    public function setHash($hash)
127
    {
128 4
        $this->hash = $hash;
129
130 4
        return $this;
131
    }
132
133
    /**
134
     * @return string
135
     */
136 1
    public function getHash()
137
    {
138 1
        return $this->hash;
139
    }
140
141
    /**
142
     * @param bool $state
143
     *
144
     * @return UserEntity
145
     */
146 8
    public function setActive($state)
147
    {
148 8
        $this->isActive = (bool) $state;
149
150 8
        return $this;
151
    }
152
153
    /**
154
     * @return bool
155
     */
156 3
    public function getActive()
157
    {
158 3
        return $this->isActive;
159
    }
160
161
    /**
162
     * @param bool $state
163
     *
164
     * @return UserEntity
165
     */
166 8
    public function setEnabled($state)
167
    {
168 8
        $this->isEnabled = (bool) $state;
169
170 8
        return $this;
171
    }
172
173
    /**
174
     * @return bool
175
     */
176 5
    public function getEnabled()
177
    {
178 5
        return $this->isEnabled;
179
    }
180
181
    /**
182
     * @param DateTime $dateCreated
183
     *
184
     * @return UserEntity
185
     */
186 4
    public function setDateCreated(DateTime $dateCreated)
187
    {
188 4
        $this->dateCreated = $dateCreated;
189
190 4
        return $this;
191
    }
192
193
    /**
194
     * @return DateTime
195
     */
196 3
    public function getDateCreated()
197
    {
198 3
        return $this->dateCreated;
199
    }
200
201
    /**
202
     * @param DateTime $dateModified
203
     *
204
     * @return UserEntity
205
     */
206 4
    public function setDateModified(DateTime $dateModified)
207
    {
208 4
        $this->dateModified = $dateModified;
209
210 4
        return $this;
211
    }
212
213
    /**
214
     * @return DateTime
215
     */
216 1
    public function getDateModified()
217
    {
218 1
        return $this->dateModified;
219
    }
220
}
221