diff options
author | Joas Schilling <coding@schilljs.com> | 2021-08-25 18:37:07 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-08-25 18:37:07 +0300 |
commit | df9c18ecce68b8e3eda0170fa33b9f17d240d6cf (patch) | |
tree | 7f41252cda65110526a93d9e2edbd4a35b509a1f /lib | |
parent | 86e2d11a6e2cdf775644add43021653eef032a3f (diff) |
Fix CS
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Service/MembershipService.php | 8 | ||||
-rw-r--r-- | lib/Service/ParticipantService.php | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/Service/MembershipService.php b/lib/Service/MembershipService.php index 511d89a9b..f1e777111 100644 --- a/lib/Service/MembershipService.php +++ b/lib/Service/MembershipService.php @@ -69,7 +69,7 @@ class MembershipService { */ protected function filterUsersWithOtherGroupMemberships(Room $room, array $users): array { $groupAttendees = $this->attendeeMapper->getActorsByType($room->getId(), Attendee::ACTOR_GROUPS); - $groupIds = array_map(static function(Attendee $attendee) { + $groupIds = array_map(static function (Attendee $attendee) { return $attendee->getActorId(); }, $groupAttendees); @@ -100,7 +100,7 @@ class MembershipService { } $circleAttendees = $this->attendeeMapper->getActorsByType($room->getId(), Attendee::ACTOR_CIRCLES); - $circleIds = array_map(static function(Attendee $attendee) { + $circleIds = array_map(static function (Attendee $attendee) { return $attendee->getActorId(); }, $circleAttendees); @@ -109,11 +109,11 @@ class MembershipService { } $circlesManager = \OC::$server->get(CirclesManager::class); - return array_filter($users, function (IUser $user) use ($circlesManager, $circleIds) { + return array_filter($users, static function (IUser $user) use ($circlesManager, $circleIds) { // Only delete users when the user is not member via another circle $federatedUser = $circlesManager->getFederatedUser($user->getUID(), Member::TYPE_USER); $memberships = $federatedUser->getMemberships(); - $userCircles = array_map(static function(Membership $membership) { + $userCircles = array_map(static function (Membership $membership) { return $membership->getCircleId(); }, $memberships); return empty(array_intersect($userCircles, $circleIds)); diff --git a/lib/Service/ParticipantService.php b/lib/Service/ParticipantService.php index d564a2e47..03d7f927a 100644 --- a/lib/Service/ParticipantService.php +++ b/lib/Service/ParticipantService.php @@ -633,7 +633,7 @@ class ParticipantService { if ($participant->getAttendee()->getActorType() === Attendee::ACTOR_GROUPS) { $this->removeGroupMembers($room, $participant, $reason); - } else if ($participant->getAttendee()->getActorType() === Attendee::ACTOR_CIRCLES) { + } elseif ($participant->getAttendee()->getActorType() === Attendee::ACTOR_CIRCLES) { $this->removeCircleMembers($room, $participant, $reason); } } |