Passed
Push — master ( cd7cec...c4157e )
by
unknown
15:30 queued 17s
created

GroupChangedEvent::getGroup()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 2
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * @copyright 2022 Anna Larch <[email protected]>
7
 *
8
 * @author Anna Larch <[email protected]>
9
 *
10
 * @license GNU AGPL version 3 or any later version
11
 *
12
 * This program is free software: you can redistribute it and/or modify
13
 * it under the terms of the GNU Affero General Public License as
14
 * published by the Free Software Foundation, either version 3 of the
15
 * License, or (at your option) any later version.
16
 *
17
 * This program is distributed in the hope that it will be useful,
18
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
 * GNU Affero General Public License for more details.
21
 *
22
 * You should have received a copy of the GNU Affero General Public License
23
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24
 *
25
 */
26
namespace OCP\Group\Events;
27
28
use OCP\EventDispatcher\Event;
29
use OCP\IGroup;
30
31
/**
32
 * @since 26.0.0
33
 */
34
class GroupChangedEvent extends Event {
35
	private IGroup $group;
36
	private string $feature;
37
	/** @var mixed */
38
	private $value;
39
	/** @var mixed */
40
	private $oldValue;
41
42
	/**
43
	 * @since 26.0.0
44
	 */
45
	public function __construct(IGroup $group,
46
		string $feature,
47
		$value,
48
		$oldValue = null) {
49
		parent::__construct();
50
		$this->group = $group;
51
		$this->feature = $feature;
52
		$this->value = $value;
53
		$this->oldValue = $oldValue;
54
	}
55
56
	/**
57
	 *
58
	 * @since 26.0.0
59
	 *
60
	 * @return IGroup
61
	 */
62
	public function getGroup(): IGroup {
63
		return $this->group;
64
	}
65
66
	/**
67
	 *
68
	 * @since 26.0.0
69
	 *
70
	 * @return string
71
	 */
72
	public function getFeature(): string {
73
		return $this->feature;
74
	}
75
76
	/**
77
	 * @since 26.0.0
78
	 *
79
	 * @return mixed
80
	 */
81
	public function getValue() {
82
		return $this->value;
83
	}
84
85
	/**
86
	 *
87
	 * @since 26.0.0
88
	 *
89
	 * @return mixed
90
	 */
91
	public function getOldValue() {
92
		return $this->oldValue;
93
	}
94
}
95