Refactor phpstan errors.

This commit is contained in:
James Cole
2023-10-29 17:41:14 +01:00
parent 5e32878d01
commit 12675dd950
60 changed files with 297 additions and 386 deletions

View File

@@ -220,7 +220,7 @@ class UserGroupRepository implements UserGroupRepositoryInterface
return $userGroup;
}
// count the number of members in the group right now:
$membershipCount = $userGroup->groupMemberships()->distinct()->get(['group_memberships.user_id'])->count();
$membershipCount = $userGroup->groupMemberships()->distinct()->count(['group_memberships.user_id']);
// if it's 1:
if (1 === $membershipCount) {