UserHooks   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 6
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A deleteUser() 0 5 1
1
<?php
2
/**
3
 * Audio Player
4
 *
5
 * This file is licensed under the Affero General Public License version 3 or
6
 * later. See the LICENSE.md file.
7
 *
8
 * @author Marcel Scherello <[email protected]>
9
 * @copyright 2016-2021 Marcel Scherello
10
 */
11
 
12
namespace OCA\audioplayer\Hooks;
13
use OCA\audioplayer\Controller;
14
15
class UserHooks {
16
	public static function deleteUser($params) {
17
		$userId = $params['uid'];
18
		$app = new \OCA\audioplayer\AppInfo\Application();
19
        	$container = $app->getContainer();
20
        $container->query(\OCA\audioplayer\Controller\DbController::class)->resetMediaLibrary($userId, null, true);
0 ignored issues
show
Deprecated Code introduced by
The function OCP\IContainer::query() has been deprecated: 20.0.0 use \Psr\Container\ContainerInterface::get ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

20
        /** @scrutinizer ignore-deprecated */ $container->query(\OCA\audioplayer\Controller\DbController::class)->resetMediaLibrary($userId, null, true);

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
21
	}    
22
}
23