Passed
Push — master ( 28e255...7ed11b )
by Morris
24:23 queued 10:03
created

SubAdminRemovedEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 29
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getGroup() 0 2 1
A getUser() 0 2 1
A __construct() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * @copyright 2019 Christoph Wurst <[email protected]>
7
 *
8
 * @author Christoph Wurst <[email protected]>
9
 * @author Morris Jobke <[email protected]>
10
 *
11
 * @license GNU AGPL version 3 or any later version
12
 *
13
 * This program is free software: you can redistribute it and/or modify
14
 * it under the terms of the GNU Affero General Public License as
15
 * published by the Free Software Foundation, either version 3 of the
16
 * License, or (at your option) any later version.
17
 *
18
 * This program is distributed in the hope that it will be useful,
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 * GNU Affero General Public License for more details.
22
 *
23
 * You should have received a copy of the GNU Affero General Public License
24
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
25
 *
26
 */
27
28
namespace OCP\Group\Events;
29
30
use OCP\EventDispatcher\Event;
31
use OCP\IGroup;
32
use OCP\IUser;
33
34
/**
35
 * @since 21.0.0
36
 */
37
class SubAdminRemovedEvent extends Event {
38
39
	/** @var IGroup */
40
	private $group;
41
42
	/*** @var IUser */
43
	private $user;
44
45
	/**
46
	 * @since 21.0.0
47
	 */
48
	public function __construct(IGroup $group, IUser $user) {
49
		parent::__construct();
50
		$this->group = $group;
51
		$this->user = $user;
52
	}
53
54
	/**
55
	 * @since 21.0.0
56
	 */
57
	public function getGroup(): IGroup {
58
		return $this->group;
59
	}
60
61
	/**
62
	 * @since 21.0.0
63
	 */
64
	public function getUser(): IUser {
65
		return $this->user;
66
	}
67
}
68