Completed
Pull Request — master (#41)
by Leszek
04:36
created

User   A

Complexity

Total Complexity 17

Size/Duplication

Total Lines 244
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 17
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 244
rs 10

17 Methods

Rating   Name   Duplication   Size   Complexity  
A getUserName() 0 3 1
A getUserAddress() 0 3 1
A getUserPass() 0 3 1
A getUserPassExpiry() 0 3 1
A getUserPassNotification() 0 3 1
A getUserSalt() 0 3 1
A getUserRole() 0 3 1
A getUserActive() 0 3 1
A getUserId() 0 3 1
A setUserName() 0 5 1
A setUserAddress() 0 5 1
A setUserPass() 0 5 1
A setUserPassExpiry() 0 5 1
A setUserPassNotification() 0 5 1
A setUserSalt() 0 5 1
A setUserRole() 0 5 1
A setUserActive() 0 5 1
1
<?php
2
3
namespace WMDE\Fundraising\Entities;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * @since 2.0
9
 *
10
 * @ORM\Table(name="users", uniqueConstraints={@ORM\UniqueConstraint(name="user_name", columns={"user_name"}), @ORM\UniqueConstraint(name="user_address", columns={"user_address"})})
11
 * @ORM\Entity
12
 */
13
class User {
14
	/**
15
	 * @var string
16
	 *
17
	 * @ORM\Column(name="user_name", type="string", length=32, options={"default":""}, nullable=false)
18
	 */
19
	private $userName = '';
20
21
	/**
22
	 * @var string
23
	 *
24
	 * @ORM\Column(name="user_address", type="string", length=64, options={"default":""}, nullable=false)
25
	 */
26
	private $userAddress = '';
27
28
	/**
29
	 * @var string
30
	 *
31
	 * @ORM\Column(name="user_pass", type="string", length=32, options={"default":""}, nullable=false)
32
	 */
33
	private $userPass = '';
34
35
	/**
36
	 * @var \DateTime
37
	 *
38
	 * @ORM\Column(name="user_pass_expiry", type="datetime", options={"default":"1970-01-01 00:00:00"}, nullable=true)
39
	 */
40
	private $userPassExpiry = '1970-01-01 00:00:00';
41
42
	/**
43
	 * @var boolean
44
	 *
45
	 * @ORM\Column(name="user_pass_notification", type="boolean", nullable=true)
46
	 */
47
	private $userPassNotification;
48
49
	/**
50
	 * @var string
51
	 *
52
	 * @ORM\Column(name="user_salt", type="string", length=8, options={"default":""}, nullable=false)
53
	 */
54
	private $userSalt = '';
55
56
	/**
57
	 * @var boolean
58
	 *
59
	 * @ORM\Column(name="user_role", type="boolean", options={"default":0}, nullable=true)
60
	 */
61
	private $userRole = 0;
62
63
	/**
64
	 * @var boolean
65
	 *
66
	 * @ORM\Column(name="user_active", type="boolean", options={"default":0}, nullable=true)
67
	 */
68
	private $userActive = 0;
69
70
	/**
71
	 * @var integer
72
	 *
73
	 * @ORM\Column(name="user_id", type="integer")
74
	 * @ORM\Id
75
	 * @ORM\GeneratedValue(strategy="IDENTITY")
76
	 */
77
	private $userId;
78
79
80
	/**
81
	 * Set userName
82
	 *
83
	 * @param string $userName
84
	 * @return User
85
	 */
86
	public function setUserName( $userName ) {
87
		$this->userName = $userName;
88
89
		return $this;
90
	}
91
92
	/**
93
	 * Get userName
94
	 *
95
	 * @return string
96
	 */
97
	public function getUserName() {
98
		return $this->userName;
99
	}
100
101
	/**
102
	 * Set userAddress
103
	 *
104
	 * @param string $userAddress
105
	 * @return User
106
	 */
107
	public function setUserAddress( $userAddress ) {
108
		$this->userAddress = $userAddress;
109
110
		return $this;
111
	}
112
113
	/**
114
	 * Get userAddress
115
	 *
116
	 * @return string
117
	 */
118
	public function getUserAddress() {
119
		return $this->userAddress;
120
	}
121
122
	/**
123
	 * Set userPass
124
	 *
125
	 * @param string $userPass
126
	 * @return User
127
	 */
128
	public function setUserPass( $userPass ) {
129
		$this->userPass = $userPass;
130
131
		return $this;
132
	}
133
134
	/**
135
	 * Get userPass
136
	 *
137
	 * @return string
138
	 */
139
	public function getUserPass() {
140
		return $this->userPass;
141
	}
142
143
	/**
144
	 * Set userPassExpiry
145
	 *
146
	 * @param \DateTime $userPassExpiry
147
	 * @return User
148
	 */
149
	public function setUserPassExpiry( $userPassExpiry ) {
150
		$this->userPassExpiry = $userPassExpiry;
151
152
		return $this;
153
	}
154
155
	/**
156
	 * Get userPassExpiry
157
	 *
158
	 * @return \DateTime
159
	 */
160
	public function getUserPassExpiry() {
161
		return $this->userPassExpiry;
162
	}
163
164
	/**
165
	 * Set userPassNotification
166
	 *
167
	 * @param boolean $userPassNotification
168
	 * @return User
169
	 */
170
	public function setUserPassNotification( $userPassNotification ) {
171
		$this->userPassNotification = $userPassNotification;
172
173
		return $this;
174
	}
175
176
	/**
177
	 * Get userPassNotification
178
	 *
179
	 * @return boolean
180
	 */
181
	public function getUserPassNotification() {
182
		return $this->userPassNotification;
183
	}
184
185
	/**
186
	 * Set userSalt
187
	 *
188
	 * @param string $userSalt
189
	 * @return User
190
	 */
191
	public function setUserSalt( $userSalt ) {
192
		$this->userSalt = $userSalt;
193
194
		return $this;
195
	}
196
197
	/**
198
	 * Get userSalt
199
	 *
200
	 * @return string
201
	 */
202
	public function getUserSalt() {
203
		return $this->userSalt;
204
	}
205
206
	/**
207
	 * Set userRole
208
	 *
209
	 * @param boolean $userRole
210
	 * @return User
211
	 */
212
	public function setUserRole( $userRole ) {
213
		$this->userRole = $userRole;
214
215
		return $this;
216
	}
217
218
	/**
219
	 * Get userRole
220
	 *
221
	 * @return boolean
222
	 */
223
	public function getUserRole() {
224
		return $this->userRole;
225
	}
226
227
	/**
228
	 * Set userActive
229
	 *
230
	 * @param boolean $userActive
231
	 * @return User
232
	 */
233
	public function setUserActive( $userActive ) {
234
		$this->userActive = $userActive;
235
236
		return $this;
237
	}
238
239
	/**
240
	 * Get userActive
241
	 *
242
	 * @return boolean
243
	 */
244
	public function getUserActive() {
245
		return $this->userActive;
246
	}
247
248
	/**
249
	 * Get userId
250
	 *
251
	 * @return integer
252
	 */
253
	public function getUserId() {
254
		return $this->userId;
255
	}
256
}
257