Passed
Push — master ( c449d5...4361d6 )
by Morris
24:35 queued 12:21
created

CalendarShareUpdatedEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
c 1
b 0
f 0
nc 1
nop 5
dl 0
loc 11
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * @copyright Copyright (c) 2020, Georg Ehrke
7
 *
8
 * @author Georg Ehrke <[email protected]>
9
 *
10
 * @license AGPL-3.0
11
 *
12
 * This code is free software: you can redistribute it and/or modify
13
 * it under the terms of the GNU Affero General Public License, version 3,
14
 * as published by the Free Software Foundation.
15
 *
16
 * This program is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
 * GNU Affero General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU Affero General Public License, version 3,
22
 * along with this program. If not, see <http://www.gnu.org/licenses/>
23
 *
24
 */
25
namespace OCA\DAV\Events;
26
27
use OCP\EventDispatcher\Event;
28
29
/**
30
 * Class CalendarShareUpdatedEvent
31
 *
32
 * @package OCA\DAV\Events
33
 * @since 20.0.0
34
 */
35
class CalendarShareUpdatedEvent extends Event {
36
37
	/** @var int */
38
	private $calendarId;
39
40
	/** @var array */
41
	private $calendarData;
42
43
	/** @var array */
44
	private $oldShares;
45
46
	/** @var array */
47
	private $added;
48
49
	/** @var array */
50
	private $removed;
51
52
	/**
53
	 * CalendarShareUpdatedEvent constructor.
54
	 *
55
	 * @param int $calendarId
56
	 * @param array $calendarData
57
	 * @param array $oldShares
58
	 * @param array $added
59
	 * @param array $removed
60
	 * @since 20.0.0
61
	 */
62
	public function __construct(int $calendarId,
63
								array $calendarData,
64
								array $oldShares,
65
								array $added,
66
								array $removed) {
67
		parent::__construct();
68
		$this->calendarId = $calendarId;
69
		$this->calendarData = $calendarData;
70
		$this->oldShares = $oldShares;
71
		$this->added = $added;
72
		$this->removed = $removed;
73
	}
74
75
	/**
76
	 * @return int
77
	 * @since 20.0.0
78
	 */
79
	public function getCalendarId(): int {
80
		return $this->calendarId;
81
	}
82
83
	/**
84
	 * @return array
85
	 * @since 20.0.0
86
	 */
87
	public function getCalendarData(): array {
88
		return $this->calendarData;
89
	}
90
91
	/**
92
	 * @return array
93
	 * @since 20.0.0
94
	 */
95
	public function getOldShares(): array {
96
		return $this->oldShares;
97
	}
98
99
	/**
100
	 * @return array
101
	 * @since 20.0.0
102
	 */
103
	public function getAdded(): array {
104
		return $this->added;
105
	}
106
107
	/**
108
	 * @return array
109
	 * @since 20.0.0
110
	 */
111
	public function getRemoved(): array {
112
		return $this->removed;
113
	}
114
}
115