@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | * |
109 | 109 | * @param string $username The username (also the login name). |
110 | 110 | * @throws InvalidArgumentException If the username is not a string. |
111 | - * @return User Chainable |
|
111 | + * @return AbstractUser Chainable |
|
112 | 112 | */ |
113 | 113 | public function setUsername($username) |
114 | 114 | { |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | /** |
133 | 133 | * @param string $email The user email. |
134 | 134 | * @throws InvalidArgumentException If the email is not a string. |
135 | - * @return User Chainable |
|
135 | + * @return AbstractUser Chainable |
|
136 | 136 | */ |
137 | 137 | public function setEmail($email) |
138 | 138 | { |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | } |
231 | 231 | |
232 | 232 | /** |
233 | - * @param string|DateTimeInterface|null $lastLoginDate The last login date. |
|
233 | + * @param string $lastLoginDate The last login date. |
|
234 | 234 | * @throws InvalidArgumentException If the ts is not a valid date/time. |
235 | 235 | * @return AbstractUser Chainable |
236 | 236 | */ |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | } |
260 | 260 | |
261 | 261 | /** |
262 | - * @return DateTimeInterface|null |
|
262 | + * @return DateTime|null |
|
263 | 263 | */ |
264 | 264 | public function lastLoginDate() |
265 | 265 | { |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | } |
299 | 299 | |
300 | 300 | /** |
301 | - * @param string|DateTimeInterface|null $lastPasswordDate The last password date. |
|
301 | + * @param string $lastPasswordDate The last password date. |
|
302 | 302 | * @throws InvalidArgumentException If the passsword date is not a valid DateTime. |
303 | 303 | * @return UserInterface Chainable |
304 | 304 | */ |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | } |
328 | 328 | |
329 | 329 | /** |
330 | - * @return DateTimeInterface|null |
|
330 | + * @return DateTime|null |
|
331 | 331 | */ |
332 | 332 | public function lastPasswordDate() |
333 | 333 | { |
@@ -13,7 +13,6 @@ |
||
13 | 13 | // Dependencies from `zendframework/zend-permissions` |
14 | 14 | use Zend\Permissions\Acl\Acl; |
15 | 15 | use Zend\Permissions\Acl\Role\GenericRole as Role; |
16 | -use Zend\Permissions\Acl\Resource\GenericResource as Resource; |
|
17 | 16 | |
18 | 17 | /** |
19 | 18 | * Manage ACL roles and permissions from config (arrays) or database. |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | * @param string $resource The Acl resource (string identifier) to load roles and permissions into. |
40 | 40 | * @return void |
41 | 41 | */ |
42 | - public function loadPermissions(Acl &$acl, array $permissions, $resource = '') |
|
42 | + public function loadPermissions(Acl & $acl, array $permissions, $resource = '') |
|
43 | 43 | { |
44 | 44 | foreach ($permissions as $role => $rolePermissions) { |
45 | 45 | $this->addRoleAndPermissions($acl, $role, $rolePermissions, $resource); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * @param string $resource The Acl resource (string identifier) to load roles and permissions into. |
54 | 54 | * @return void |
55 | 55 | */ |
56 | - public function loadDatabasePermissions(Acl &$acl, PDO $db, $table, $resource = '') |
|
56 | + public function loadDatabasePermissions(Acl & $acl, PDO $db, $table, $resource = '') |
|
57 | 57 | { |
58 | 58 | // Quick-and-dirty sanitization |
59 | 59 | $table = preg_replace('/[^A-Za-z0-9 ]/', '', $table); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * @param string $resource The Acl resource (string identifier) to add roles and permissions into. |
91 | 91 | * @return void |
92 | 92 | */ |
93 | - private function addRoleAndPermissions(Acl &$acl, $role, array $permissions, $resource) |
|
93 | + private function addRoleAndPermissions(Acl & $acl, $role, array $permissions, $resource) |
|
94 | 94 | { |
95 | 95 | if (!$acl->hasRole($role)) { |
96 | 96 | // Add role |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | /** |
66 | 66 | * @param string $parent Role's parent. |
67 | - * @return AclRole Chainable |
|
67 | + * @return Role Chainable |
|
68 | 68 | */ |
69 | 69 | public function setParent($parent) |
70 | 70 | { |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | /** |
84 | 84 | * @param string[]|string|null $allowed The allowed permissions for this role. |
85 | 85 | * @throws InvalidArgumentException If the passed arguments is not an array, null, or a comma-separated string. |
86 | - * @return AclRole Chainable |
|
86 | + * @return Role Chainable |
|
87 | 87 | */ |
88 | 88 | public function setAllowed($allowed) |
89 | 89 | { |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | /** |
117 | 117 | * @param string[]|string|null $denied The denied permissions for this role. |
118 | 118 | * @throws InvalidArgumentException If the passed arguments is not an array, null, or a comma-separated string. |
119 | - * @return AclRole Chainable |
|
119 | + * @return Role Chainable |
|
120 | 120 | */ |
121 | 121 | public function setDenied($denied) |
122 | 122 | { |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | |
149 | 149 | /** |
150 | 150 | * @param boolean $isSuper The superuser flag. |
151 | - * @return AclRole Chainable |
|
151 | + * @return Role Chainable |
|
152 | 152 | */ |
153 | 153 | public function setSuperuser($isSuper) |
154 | 154 | { |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | |
167 | 167 | /** |
168 | 168 | * @param integer $position The role's ordering position. |
169 | - * @return AclRole Chainable |
|
169 | + * @return Role Chainable |
|
170 | 170 | */ |
171 | 171 | public function setPosition($position) |
172 | 172 | { |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | * |
102 | 102 | * @param string $username The username (also the login name). |
103 | 103 | * @throws InvalidArgumentException If the username is not a string. |
104 | - * @return User Chainable |
|
104 | + * @return AuthToken Chainable |
|
105 | 105 | */ |
106 | 106 | public function setUsername($username) |
107 | 107 | { |
@@ -123,9 +123,9 @@ discard block |
||
123 | 123 | } |
124 | 124 | |
125 | 125 | /** |
126 | - * @param DateTime|string|null $expiry The date/time at object's creation. |
|
126 | + * @param string $expiry The date/time at object's creation. |
|
127 | 127 | * @throws InvalidArgumentException If the date/time is invalid. |
128 | - * @return Content Chainable |
|
128 | + * @return AuthToken Chainable |
|
129 | 129 | */ |
130 | 130 | public function setExpiry($expiry) |
131 | 131 | { |
@@ -154,9 +154,9 @@ discard block |
||
154 | 154 | } |
155 | 155 | |
156 | 156 | /** |
157 | - * @param DateTime|string|null $created The date/time at object's creation. |
|
157 | + * @param string $created The date/time at object's creation. |
|
158 | 158 | * @throws InvalidArgumentException If the date/time is invalid. |
159 | - * @return Content Chainable |
|
159 | + * @return AuthToken Chainable |
|
160 | 160 | */ |
161 | 161 | public function setCreated($created) |
162 | 162 | { |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | } |
178 | 178 | |
179 | 179 | /** |
180 | - * @return DateTime|null |
|
180 | + * @return DateTimeInterface |
|
181 | 181 | */ |
182 | 182 | public function created() |
183 | 183 | { |
@@ -185,9 +185,9 @@ discard block |
||
185 | 185 | } |
186 | 186 | |
187 | 187 | /** |
188 | - * @param DateTime|string|null $lastModified The last modified date/time. |
|
188 | + * @param string $lastModified The last modified date/time. |
|
189 | 189 | * @throws InvalidArgumentException If the date/time is invalid. |
190 | - * @return Content Chainable |
|
190 | + * @return AuthToken Chainable |
|
191 | 191 | */ |
192 | 192 | public function setLastModified($lastModified) |
193 | 193 | { |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | /** |
304 | 304 | * @param mixed $ident The auth-token identifier. |
305 | 305 | * @param string $token The token key to validate against. |
306 | - * @return mixed The user id. |
|
306 | + * @return string The user id. |
|
307 | 307 | */ |
308 | 308 | public function getUserId($ident, $token) |
309 | 309 | { |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | /** |
314 | 314 | * @param mixed $ident The auth-token identifier (username). |
315 | 315 | * @param string $token The token to validate against. |
316 | - * @return mixed The user id. An empty string if no token match. |
|
316 | + * @return string The user id. An empty string if no token match. |
|
317 | 317 | */ |
318 | 318 | public function getUsernameFromToken($ident, $token) |
319 | 319 | { |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | * DescribableTrait > create_metadata(). |
371 | 371 | * |
372 | 372 | * @param array $data Optional data to intialize the Metadata object with. |
373 | - * @return MetadataInterface |
|
373 | + * @return AuthTokenMetadata |
|
374 | 374 | */ |
375 | 375 | protected function createMetadata(array $data = null) |
376 | 376 | { |