@@ -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 | { |
@@ -246,10 +246,10 @@ |
||
246 | 246 | return $this; |
247 | 247 | } |
248 | 248 | |
249 | - /** |
|
250 | - * StorableTrait > preSave(): Called automatically before saving the object to source. |
|
251 | - * @return boolean |
|
252 | - */ |
|
249 | + /** |
|
250 | + * StorableTrait > preSave(): Called automatically before saving the object to source. |
|
251 | + * @return boolean |
|
252 | + */ |
|
253 | 253 | public function preSave() |
254 | 254 | { |
255 | 255 | parent::preSave(); |
@@ -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 DateTimeInterface|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 DateTimeInterface|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 | { |
@@ -185,9 +185,9 @@ discard block |
||
185 | 185 | } |
186 | 186 | |
187 | 187 | /** |
188 | - * @param DateTimeInterface|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 | { |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | * @param string $resource The Acl resource (string identifier) to load roles and permissions into. |
39 | 39 | * @return void |
40 | 40 | */ |
41 | - public function loadPermissions(Acl &$acl, array $permissions, $resource = '') |
|
41 | + public function loadPermissions(Acl&$acl, array $permissions, $resource = '') |
|
42 | 42 | { |
43 | 43 | foreach ($permissions as $role => $rolePermissions) { |
44 | 44 | $this->addRoleAndPermissions($acl, $role, $rolePermissions, $resource); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | * @param string $resource The Acl resource (string identifier) to load roles and permissions into. |
53 | 53 | * @return void |
54 | 54 | */ |
55 | - public function loadDatabasePermissions(Acl &$acl, PDO $db, $table, $resource = '') |
|
55 | + public function loadDatabasePermissions(Acl&$acl, PDO $db, $table, $resource = '') |
|
56 | 56 | { |
57 | 57 | // Quick-and-dirty sanitization |
58 | 58 | $table = preg_replace('/[^A-Za-z0-9_]/', '', $table); |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | * @param string $resource The Acl resource (string identifier) to add roles and permissions into. |
90 | 90 | * @return void |
91 | 91 | */ |
92 | - private function addRoleAndPermissions(Acl &$acl, $role, array $permissions, $resource) |
|
92 | + private function addRoleAndPermissions(Acl&$acl, $role, array $permissions, $resource) |
|
93 | 93 | { |
94 | 94 | if (!$acl->hasRole($role)) { |
95 | 95 | // Add role |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | * |
104 | 104 | * @param string $username The username (also the login name). |
105 | 105 | * @throws InvalidArgumentException If the username is not a string. |
106 | - * @return User Chainable |
|
106 | + * @return AbstractUser Chainable |
|
107 | 107 | */ |
108 | 108 | public function setUsername($username) |
109 | 109 | { |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | /** |
128 | 128 | * @param string $email The user email. |
129 | 129 | * @throws InvalidArgumentException If the email is not a string. |
130 | - * @return User Chainable |
|
130 | + * @return AbstractUser Chainable |
|
131 | 131 | */ |
132 | 132 | public function setEmail($email) |
133 | 133 | { |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | } |
209 | 209 | |
210 | 210 | /** |
211 | - * @param string|DateTimeInterface|null $lastLoginDate The last login date. |
|
211 | + * @param string $lastLoginDate The last login date. |
|
212 | 212 | * @throws InvalidArgumentException If the ts is not a valid date/time. |
213 | 213 | * @return AbstractUser Chainable |
214 | 214 | */ |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | } |
277 | 277 | |
278 | 278 | /** |
279 | - * @param string|DateTimeInterface|null $lastPasswordDate The last password date. |
|
279 | + * @param string $lastPasswordDate The last password date. |
|
280 | 280 | * @throws InvalidArgumentException If the passsword date is not a valid DateTime. |
281 | 281 | * @return UserInterface Chainable |
282 | 282 | */ |