diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2020-07-08 13:49:11 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-09-16 16:37:17 +0200 |
commit | 096fe2061137805b4fcc4397a9efaf86e11fecbc (patch) | |
tree | f11d34167c14b50ff4e0184e3cbbb84dacb9ed6d /apps/admin_audit/lib | |
parent | a72edb0d0e79c1f82baa9a08d9e1b505a5e50165 (diff) | |
download | nextcloud-server-096fe2061137805b4fcc4397a9efaf86e11fecbc.tar.gz nextcloud-server-096fe2061137805b4fcc4397a9efaf86e11fecbc.zip |
Help static code analysis to understand code.
It adds proper type hints to private namespace to allow private namespace methods.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'apps/admin_audit/lib')
-rw-r--r-- | apps/admin_audit/lib/AppInfo/Application.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/admin_audit/lib/AppInfo/Application.php b/apps/admin_audit/lib/AppInfo/Application.php index b63c361b51f..6803887a815 100644 --- a/apps/admin_audit/lib/AppInfo/Application.php +++ b/apps/admin_audit/lib/AppInfo/Application.php @@ -36,7 +36,8 @@ namespace OCA\AdminAudit\AppInfo; use Closure; use OC\Files\Filesystem; use OC\Files\Node\File; -use OC\Group\Manager; +use OC\Group\Manager as GroupManager; +use OC\User\Session as UserSession; use OCA\AdminAudit\Actions\AppManagement; use OCA\AdminAudit\Actions\Auth; use OCA\AdminAudit\Actions\Console; @@ -134,6 +135,7 @@ class Application extends App implements IBootstrap { Util::connectHook('OC_User', 'post_deleteUser', $userActions, 'delete'); Util::connectHook('OC_User', 'changeUser', $userActions, 'change'); + assert($userSession instanceof UserSession); $userSession->listen('\OC\User', 'postSetPassword', [$userActions, 'setPassword']); $userSession->listen('\OC\User', 'assignedUserId', [$userActions, 'assign']); $userSession->listen('\OC\User', 'postUnassignedUserId', [$userActions, 'unassign']); @@ -143,7 +145,7 @@ class Application extends App implements IBootstrap { IGroupManager $groupManager) { $groupActions = new GroupManagement($logger); - /** @var IGroupManager|Manager $groupManager */ + assert($groupManager instanceof GroupManager); $groupManager->listen('\OC\Group', 'postRemoveUser', [$groupActions, 'removeUser']); $groupManager->listen('\OC\Group', 'postAddUser', [$groupActions, 'addUser']); $groupManager->listen('\OC\Group', 'postDelete', [$groupActions, 'deleteGroup']); |