Fix phpstan error courtesy of the laravel 11 upgrade (changed signatures and return types)

This commit is contained in:
James Cole
2024-04-02 15:40:33 +02:00
parent 87911c2438
commit a17bc7258f
73 changed files with 2772 additions and 2827 deletions

View File

@@ -106,8 +106,8 @@ class UserGroupRepository implements UserGroupRepositoryInterface
/** @var null|UserGroup $group */
$group = $membership->userGroup()->first();
if (null !== $group) {
$groupId = (int)$group->id;
if (in_array($groupId, $set, true)) {
$groupId = $group->id;
if (in_array($groupId, array_keys($set), true)) {
continue;
}
$set[$groupId] = $group;

View File

@@ -38,8 +38,6 @@ interface UserGroupRepositoryInterface
public function get(): Collection;
public function useUserGroup(UserGroup $userGroup): void;
public function getAll(): Collection;
public function setUser(null|Authenticatable|User $user): void;
@@ -49,4 +47,6 @@ interface UserGroupRepositoryInterface
public function update(UserGroup $userGroup, array $data): UserGroup;
public function updateMembership(UserGroup $userGroup, array $data): UserGroup;
public function useUserGroup(UserGroup $userGroup): void;
}