@@ -123,7 +123,7 @@ 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 | 128 | * @return AuthToken Chainable |
| 129 | 129 | */ |
@@ -154,7 +154,7 @@ 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 | 159 | * @return AuthToken Chainable |
| 160 | 160 | */ |
@@ -185,7 +185,7 @@ 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 | 190 | * @return AuthToken Chainable |
| 191 | 191 | */ |
@@ -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 | { |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | $this->setLastLoginIp($ip); |
| 455 | 455 | } |
| 456 | 456 | |
| 457 | - $this->update([ 'last_login_ip', 'last_login_date' ]); |
|
| 457 | + $this->update(['last_login_ip', 'last_login_date']); |
|
| 458 | 458 | |
| 459 | 459 | $this->saveToSession(); |
| 460 | 460 | |
@@ -541,7 +541,7 @@ discard block |
||
| 541 | 541 | } |
| 542 | 542 | |
| 543 | 543 | if ($this->id()) { |
| 544 | - $this->update([ 'password', 'last_password_date', 'last_password_ip' ]); |
|
| 544 | + $this->update(['password', 'last_password_date', 'last_password_ip']); |
|
| 545 | 545 | } |
| 546 | 546 | |
| 547 | 547 | return $this; |
@@ -3,9 +3,7 @@ |
||
| 3 | 3 | namespace Charcoal\User\Acl; |
| 4 | 4 | |
| 5 | 5 | use InvalidArgumentException; |
| 6 | - |
|
| 7 | 6 | use Pimple\Container; |
| 8 | - |
|
| 9 | 7 | use Charcoal\Translator\TranslatorAwareTrait; |
| 10 | 8 | |
| 11 | 9 | // From 'charcoal-core' |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | * @param Container $container The Pimple DI Container. |
| 32 | 32 | * @return Authenticator |
| 33 | 33 | */ |
| 34 | - $container['authenticator'] = function (Container $container) { |
|
| 34 | + $container['authenticator'] = function(Container $container) { |
|
| 35 | 35 | return new Authenticator([ |
| 36 | 36 | 'logger' => $container['logger'], |
| 37 | 37 | 'user_type' => User::class, |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | * @param Container $container The Pimple DI container. |
| 48 | 48 | * @return Authorizer |
| 49 | 49 | */ |
| 50 | - $container['authorizer'] = function (Container $container) { |
|
| 50 | + $container['authorizer'] = function(Container $container) { |
|
| 51 | 51 | return new Authorizer([ |
| 52 | 52 | 'logger' => $container['logger'], |
| 53 | 53 | 'acl' => new Acl(), |
@@ -121,11 +121,11 @@ |
||
| 121 | 121 | return $this->authorizer; |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | - /** |
|
| 125 | - * @param string[]|string|null $permissions The list of required permissions. |
|
| 126 | - * @throws InvalidArgumentException If the permissions are not an array or a comma-separated string. |
|
| 127 | - * @return self |
|
| 128 | - */ |
|
| 124 | + /** |
|
| 125 | + * @param string[]|string|null $permissions The list of required permissions. |
|
| 126 | + * @throws InvalidArgumentException If the permissions are not an array or a comma-separated string. |
|
| 127 | + * @return self |
|
| 128 | + */ |
|
| 129 | 129 | protected function setRequiredAclPermissions($permissions) |
| 130 | 130 | { |
| 131 | 131 | if ($permissions === null || !$permissions) { |