Passed
Push — master ( 2af77b...788366 )
by Morris
11:45 queued 11s
created

Hooks   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 11
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A post_deleteUser() 0 2 1
A post_deleteGroup() 0 2 1
A post_removeFromGroupLDAP() 0 2 1
1
<?php
2
/**
3
 * @copyright Copyright (c) 2016, ownCloud, Inc.
4
 *
5
 * @author Roeland Jago Douma <[email protected]>
6
 *
7
 * @license AGPL-3.0
8
 *
9
 * This code is free software: you can redistribute it and/or modify
10
 * it under the terms of the GNU Affero General Public License, version 3,
11
 * as published by the Free Software Foundation.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
 * GNU Affero General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU Affero General Public License, version 3,
19
 * along with this program. If not, see <http://www.gnu.org/licenses/>
20
 *
21
 */
22
23
namespace OC\Share20;
24
25
class Hooks {
26
	public static function post_deleteUser($arguments) {
27
		\OC::$server->getShareManager()->userDeleted($arguments['uid']);
0 ignored issues
show
Deprecated Code introduced by
The function OC\Server::getShareManager() has been deprecated. ( Ignorable by Annotation )

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

27
		/** @scrutinizer ignore-deprecated */ \OC::$server->getShareManager()->userDeleted($arguments['uid']);
Loading history...
28
	}
29
30
	public static function post_deleteGroup($arguments) {
31
		\OC::$server->getShareManager()->groupDeleted($arguments['gid']);
0 ignored issues
show
Deprecated Code introduced by
The function OC\Server::getShareManager() has been deprecated. ( Ignorable by Annotation )

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

31
		/** @scrutinizer ignore-deprecated */ \OC::$server->getShareManager()->groupDeleted($arguments['gid']);
Loading history...
32
	}
33
34
	public static function post_removeFromGroupLDAP($arguments) {
35
		\OC::$server->getShareManager()->userDeletedFromGroup($arguments['uid'], $arguments['gid']);
0 ignored issues
show
Deprecated Code introduced by
The function OC\Server::getShareManager() has been deprecated. ( Ignorable by Annotation )

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

35
		/** @scrutinizer ignore-deprecated */ \OC::$server->getShareManager()->userDeletedFromGroup($arguments['uid'], $arguments['gid']);
Loading history...
36
	}
37
}
38