Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions phpstan-baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -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<int|string, bool|float|int|object|string|null>|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<mixed>|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<int|string, bool|float|int|object|string|null>|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<mixed>|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<int|string, bool|float|int|object|string|null>|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<mixed>|object|null) of method CodeIgniter\\Model::update()',
'identifier' => 'method.childParameterType',
'count' => 1,
'path' => __DIR__ . '/src/Models/UserModel.php',
Expand Down
2 changes: 0 additions & 2 deletions src/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 0 additions & 2 deletions src/Authentication/Authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 0 additions & 2 deletions src/Authentication/Authenticators/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ private function checkSecurityConfig(): void

/**
* Sets the $shouldRemember flag
*
* @return $this
*/
public function remember(bool $shouldRemember = true): self
{
Expand Down
2 changes: 0 additions & 2 deletions src/Authentication/Traits/HasAccessTokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ public function currentAccessToken(): ?AccessToken

/**
* Sets the current active token for this user.
*
* @return $this
*/
public function setAccessToken(?AccessToken $accessToken): self
{
Expand Down
2 changes: 0 additions & 2 deletions src/Authentication/Traits/HasHmacTokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ public function currentHmacToken(): ?AccessToken

/**
* Sets the current active token for this user.
*
* @return $this
*/
public function setHmacToken(?AccessToken $accessToken): self
{
Expand Down
12 changes: 0 additions & 12 deletions src/Authorization/Traits/Authorizable.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ trait Authorizable

/**
* Adds one or more groups to the current User.
*
* @return $this
*/
public function addGroup(string ...$groups): self
{
Expand Down Expand Up @@ -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
{
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
{
Expand All @@ -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
Expand Down
6 changes: 0 additions & 6 deletions src/Models/UserModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ protected function initialize(): void

/**
* Mark the next find* query to include identities
*
* @return $this
*/
public function withIdentities(): self
{
Expand All @@ -88,8 +86,6 @@ public function withIdentities(): self

/**
* Mark the next find* query to include groups
*
* @return $this
*/
public function withGroups(): self
{
Expand All @@ -100,8 +96,6 @@ public function withGroups(): self

/**
* Mark the next find* query to include permissions
*
* @return $this
*/
public function withPermissions(): self
{
Expand Down
2 changes: 0 additions & 2 deletions src/Test/AuthenticationTesting.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
4 changes: 0 additions & 4 deletions src/Traits/Bannable.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ public function isBanned(): bool

/**
* Ban the user from logging in.
*
* @return $this
*/
public function ban(?string $message = null): self
{
Expand All @@ -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
{
Expand Down
Loading