diff --git a/phpstan-baseline.php b/phpstan-baseline.php index c2fc4cb1f..8f7fd4fac 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -260,19 +260,19 @@ 'path' => __DIR__ . '/src/Models/UserModel.php', ]; $ignoreErrors[] = [ - 'rawMessage' => 'Parameter #1 $row (array|CodeIgniter\\Shield\\Entities\\User) of method CodeIgniter\\Shield\\Models\\UserModel::insert() should be contravariant with parameter $row (array|object|null) of method CodeIgniter\\Model::insert()', + 'rawMessage' => 'Parameter #1 $row (array|CodeIgniter\\Shield\\Entities\\User) of method CodeIgniter\\Shield\\Models\\UserModel::insert() should be contravariant with parameter $row (array|object|null) of method CodeIgniter\\Model::insert()', 'identifier' => 'method.childParameterType', 'count' => 1, 'path' => __DIR__ . '/src/Models/UserModel.php', ]; $ignoreErrors[] = [ - 'rawMessage' => 'Parameter #1 $row (array|CodeIgniter\\Shield\\Entities\\User) of method CodeIgniter\\Shield\\Models\\UserModel::save() should be contravariant with parameter $row (array|object) of method CodeIgniter\\BaseModel::save()', + 'rawMessage' => 'Parameter #1 $row (array|CodeIgniter\\Shield\\Entities\\User) of method CodeIgniter\\Shield\\Models\\UserModel::save() should be contravariant with parameter $row (array|object) of method CodeIgniter\\BaseModel::save()', 'identifier' => 'method.childParameterType', 'count' => 1, 'path' => __DIR__ . '/src/Models/UserModel.php', ]; $ignoreErrors[] = [ - 'rawMessage' => 'Parameter #2 $row (array|CodeIgniter\\Shield\\Entities\\User) of method CodeIgniter\\Shield\\Models\\UserModel::update() should be contravariant with parameter $row (array|object|null) of method CodeIgniter\\Model::update()', + 'rawMessage' => 'Parameter #2 $row (array|CodeIgniter\\Shield\\Entities\\User) of method CodeIgniter\\Shield\\Models\\UserModel::update() should be contravariant with parameter $row (array|object|null) of method CodeIgniter\\Model::update()', 'identifier' => 'method.childParameterType', 'count' => 1, 'path' => __DIR__ . '/src/Models/UserModel.php', diff --git a/src/Auth.php b/src/Auth.php index 521ba5c31..8365e255c 100644 --- a/src/Auth.php +++ b/src/Auth.php @@ -71,8 +71,6 @@ protected function ensureAuthentication(): void /** * Sets the Authenticator alias that should be used for this request. - * - * @return $this */ public function setAuthenticator(?string $alias = null): self { diff --git a/src/Authentication/Authentication.php b/src/Authentication/Authentication.php index 2d4b3a273..0a3d7e358 100644 --- a/src/Authentication/Authentication.php +++ b/src/Authentication/Authentication.php @@ -69,8 +69,6 @@ public function factory(?string $alias = null): AuthenticatorInterface /** * Sets the User Provider to use. - * - * @return $this */ public function setProvider(UserModel $provider): self { diff --git a/src/Authentication/Authenticators/Session.php b/src/Authentication/Authenticators/Session.php index 542b0065b..d98458157 100644 --- a/src/Authentication/Authenticators/Session.php +++ b/src/Authentication/Authenticators/Session.php @@ -112,8 +112,6 @@ private function checkSecurityConfig(): void /** * Sets the $shouldRemember flag - * - * @return $this */ public function remember(bool $shouldRemember = true): self { diff --git a/src/Authentication/Traits/HasAccessTokens.php b/src/Authentication/Traits/HasAccessTokens.php index 5e2322bc4..5f13c225c 100644 --- a/src/Authentication/Traits/HasAccessTokens.php +++ b/src/Authentication/Traits/HasAccessTokens.php @@ -155,8 +155,6 @@ public function currentAccessToken(): ?AccessToken /** * Sets the current active token for this user. - * - * @return $this */ public function setAccessToken(?AccessToken $accessToken): self { diff --git a/src/Authentication/Traits/HasHmacTokens.php b/src/Authentication/Traits/HasHmacTokens.php index 4bea21825..a690ae129 100644 --- a/src/Authentication/Traits/HasHmacTokens.php +++ b/src/Authentication/Traits/HasHmacTokens.php @@ -145,8 +145,6 @@ public function currentHmacToken(): ?AccessToken /** * Sets the current active token for this user. - * - * @return $this */ public function setHmacToken(?AccessToken $accessToken): self { diff --git a/src/Authorization/Traits/Authorizable.php b/src/Authorization/Traits/Authorizable.php index c9e40d1d0..66b662682 100644 --- a/src/Authorization/Traits/Authorizable.php +++ b/src/Authorization/Traits/Authorizable.php @@ -26,8 +26,6 @@ trait Authorizable /** * Adds one or more groups to the current User. - * - * @return $this */ public function addGroup(string ...$groups): self { @@ -63,8 +61,6 @@ public function addGroup(string ...$groups): self /** * Removes one or more groups from the user. - * - * @return $this */ public function removeGroup(string ...$groups): self { @@ -88,8 +84,6 @@ public function removeGroup(string ...$groups): self * so only those groups are valid for this user, removing * all groups not in this list. * - * @return $this - * * @throws AuthorizationException */ public function syncGroups(string ...$groups): self @@ -150,8 +144,6 @@ public function getPermissions(): ?array /** * Adds one or more permissions to the current user. * - * @return $this - * * @throws AuthorizationException */ public function addPermission(string ...$permissions): self @@ -188,8 +180,6 @@ public function addPermission(string ...$permissions): self /** * Removes one or more permissions from the current user. - * - * @return $this */ public function removePermission(string ...$permissions): self { @@ -213,8 +203,6 @@ public function removePermission(string ...$permissions): self * so only those permissions are valid for this user, removing * all permissions not in this list. * - * @return $this - * * @throws AuthorizationException */ public function syncPermissions(string ...$permissions): self diff --git a/src/Models/UserModel.php b/src/Models/UserModel.php index c2f689bfb..9ba28709a 100644 --- a/src/Models/UserModel.php +++ b/src/Models/UserModel.php @@ -76,8 +76,6 @@ protected function initialize(): void /** * Mark the next find* query to include identities - * - * @return $this */ public function withIdentities(): self { @@ -88,8 +86,6 @@ public function withIdentities(): self /** * Mark the next find* query to include groups - * - * @return $this */ public function withGroups(): self { @@ -100,8 +96,6 @@ public function withGroups(): self /** * Mark the next find* query to include permissions - * - * @return $this */ public function withPermissions(): self { diff --git a/src/Test/AuthenticationTesting.php b/src/Test/AuthenticationTesting.php index 437a2477a..f4f728f70 100644 --- a/src/Test/AuthenticationTesting.php +++ b/src/Test/AuthenticationTesting.php @@ -27,8 +27,6 @@ trait AuthenticationTesting * Logs the user for testing purposes. * * @param bool $pending Whether pending login state or not. - * - * @return $this */ public function actingAs(User $user, bool $pending = false): self { diff --git a/src/Traits/Bannable.php b/src/Traits/Bannable.php index 739f32e14..71fe6c6cd 100644 --- a/src/Traits/Bannable.php +++ b/src/Traits/Bannable.php @@ -25,8 +25,6 @@ public function isBanned(): bool /** * Ban the user from logging in. - * - * @return $this */ public function ban(?string $message = null): self { @@ -42,8 +40,6 @@ public function ban(?string $message = null): self /** * Unban the user and allow them to login - * - * @return $this */ public function unBan(): self {