User   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A deleteUser() 0 11 1
1
<?php
2
/**
3
 * ownCloud - News
4
 *
5
 * This file is licensed under the Affero General Public License version 3 or
6
 * later. See the COPYING file.
7
 *
8
 * @author Alessandro Cosentino <[email protected]>
9
 * @author Bernhard Posselt <[email protected]>
10
 * @copyright Alessandro Cosentino 2012
11
 * @copyright Bernhard Posselt 2012, 2014
12
 */
13
14
namespace OCA\News\Hooks;
15
16
use OCA\News\AppInfo\Application;
17
use OCA\News\Service\ItemService;
18
use OCA\News\Service\FeedService;
19
use OCA\News\Service\FolderService;
20
21
class User {
22
23
    public static function deleteUser($params) {
24
        $userId = $params['uid'];
25
26
        $app = new Application();
27
        $container = $app->getContainer();
28
29
        // order is important!
30
        $container->query(ItemService::class)->deleteUser($userId);
31
        $container->query(FeedService::class)->deleteUser($userId);
32
        $container->query(FolderService::class)->deleteUser($userId);
33
    }
34
35
}
36