diff --git a/lib/Dav/GroupMembershipCollection.php b/lib/Dav/GroupMembershipCollection.php index bd94bdfc..22d00de7 100644 --- a/lib/Dav/GroupMembershipCollection.php +++ b/lib/Dav/GroupMembershipCollection.php @@ -118,7 +118,7 @@ public function delete() { $event = new GenericEvent(null, [ 'groupName' => $this->groupInfo['display_name'], 'groupId' => $groupId]); - $this->dispatcher->dispatch('\OCA\CustomGroups::deleteGroup', $event); + $this->dispatcher->dispatch($event, '\OCA\CustomGroups::deleteGroup'); } /** @@ -216,7 +216,7 @@ public function createFile($userId, $data = null) { 'groupName' => $this->groupInfo['display_name'], 'groupId' => $groupId, 'user' => $userId]); - $this->dispatcher->dispatch('\OCA\CustomGroups::addUserToGroup', $event); + $this->dispatcher->dispatch($event, '\OCA\CustomGroups::addUserToGroup'); } /** @@ -330,7 +330,7 @@ public function updateDisplayName($displayName) { 'oldGroupName' => $this->groupInfo['display_name'], 'newGroupName' => $displayName, 'groupId' => $this->groupInfo['group_id']]); - $this->dispatcher->dispatch('\OCA\CustomGroups::updateGroupName', $event); + $this->dispatcher->dispatch($event, '\OCA\CustomGroups::updateGroupName'); $result = $this->groupsHandler->updateGroup( $this->groupInfo['group_id'], diff --git a/lib/Dav/GroupsCollection.php b/lib/Dav/GroupsCollection.php index b8df57e1..8169f85d 100644 --- a/lib/Dav/GroupsCollection.php +++ b/lib/Dav/GroupsCollection.php @@ -193,7 +193,7 @@ private function createGroup($name, $displayName) { 'groupName' => $name, 'groupId' => $groupId, 'user' => $this->helper->getUserId()]); - $this->dispatcher->dispatch('\OCA\CustomGroups::addGroupAndUser', $event); + $this->dispatcher->dispatch($event, '\OCA\CustomGroups::addGroupAndUser'); } /** diff --git a/lib/Dav/MembershipNode.php b/lib/Dav/MembershipNode.php index b4c77a3a..91e9febe 100644 --- a/lib/Dav/MembershipNode.php +++ b/lib/Dav/MembershipNode.php @@ -141,7 +141,7 @@ public function delete() { * This event is deprecated. The keys of the event array are not using camel case. */ $event = new GenericEvent(null, ['user_displayName' => $userId, 'group_displayName' => $this->groupInfo['display_name']]); - $this->dispatcher->dispatch('\OCA\CustomGroups::removeUserFromGroup', $event); + $this->dispatcher->dispatch($event, '\OCA\CustomGroups::removeUserFromGroup'); /** * The new event which has camel case for arguments in event array. */ @@ -149,7 +149,7 @@ public function delete() { 'user' => $userId, 'groupName' => $this->groupInfo['display_name'], 'groupId' => $groupId]); - $this->dispatcher->dispatch('customGroups.removeUserFromGroup', $newEvent); + $this->dispatcher->dispatch($newEvent, 'customGroups.removeUserFromGroup'); } //Send dispatcher event if the removal is self @@ -159,7 +159,7 @@ public function delete() { * as key for event argument */ $event = new GenericEvent(null, ['userId' => $userId, 'groupName' => $this->groupInfo['display_name']]); - $this->dispatcher->dispatch('\OCA\CustomGroups::leaveFromGroup', $event); + $this->dispatcher->dispatch($event, '\OCA\CustomGroups::leaveFromGroup'); /** * From now on use this event 'customGroups.leaveFromGroup' */ @@ -167,7 +167,7 @@ public function delete() { 'user' => $userId, 'groupName' => $this->groupInfo['display_name'], 'groupId' => $groupId]); - $this->dispatcher->dispatch('customGroups.leaveFromGroup', $newEvent); + $this->dispatcher->dispatch($newEvent, 'customGroups.leaveFromGroup'); } } diff --git a/lib/Service/MembershipHelper.php b/lib/Service/MembershipHelper.php index c261cce7..e6bbe138 100644 --- a/lib/Service/MembershipHelper.php +++ b/lib/Service/MembershipHelper.php @@ -298,7 +298,7 @@ public function notifyUserRoleChange($targetUserId, array $groupInfo, array $mem 'roleNumber' => $memberInfo['role'], 'roleDisaplayName' => $roleName, 'groupId' => $memberInfo['group_id']]); - $this->dispatcher->dispatch('\OCA\CustomGroups::changeRoleInGroup', $event); + $this->dispatcher->dispatch($event, '\OCA\CustomGroups::changeRoleInGroup'); } /** diff --git a/vendor-bin/phan/composer.json b/vendor-bin/phan/composer.json new file mode 100644 index 00000000..0794bc33 --- /dev/null +++ b/vendor-bin/phan/composer.json @@ -0,0 +1,5 @@ +{ + "require": { + "phan/phan": "^5.2" + } +}