mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-25 21:16:47 +00:00
Fix phpstan issues.
This commit is contained in:
@@ -57,7 +57,7 @@ class UserGroupTransformer extends AbstractTransformer
|
||||
$user = auth()->user();
|
||||
/** @var UserGroup $userGroup */
|
||||
foreach ($objects as $userGroup) {
|
||||
$userGroupId = (int)$userGroup->id;
|
||||
$userGroupId = $userGroup->id;
|
||||
$access = $user->hasRoleInGroup($userGroup, UserRoleEnum::VIEW_MEMBERSHIPS, true, true);
|
||||
if ($access) {
|
||||
$groupMemberships = $userGroup->groupMemberships()->get();
|
||||
@@ -84,11 +84,11 @@ class UserGroupTransformer extends AbstractTransformer
|
||||
public function transform(UserGroup $userGroup): array
|
||||
{
|
||||
$return = [
|
||||
'id' => (int)$userGroup->id,
|
||||
'id' => $userGroup->id,
|
||||
'created_at' => $userGroup->created_at->toAtomString(),
|
||||
'updated_at' => $userGroup->updated_at->toAtomString(),
|
||||
'title' => $userGroup->title,
|
||||
'members' => $this->memberships[(int)$userGroup->id] ?? [],
|
||||
'members' => $this->memberships[$userGroup->id] ?? [],
|
||||
];
|
||||
// if the user has a specific role in this group, then collect the memberships.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user