Passed
Push — master ( 0051bb...a3d936 )
by Joas
11:37 queued 11s
created

AutoCompleteEvent::setResults()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
/**
4
 * @copyright Copyright (c) 2019 Joas Schilling <[email protected]>
5
 *
6
 * @license GNU AGPL version 3 or any later version
7
 *
8
 * This program is free software: you can redistribute it and/or modify
9
 * it under the terms of the GNU Affero General Public License as
10
 * published by the Free Software Foundation, either version 3 of the
11
 * License, or (at your option) any later version.
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
19
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
 *
21
 */
22
23
namespace OCP\Collaboration\AutoComplete;
24
25
26
use Symfony\Component\EventDispatcher\GenericEvent;
27
28
/**
29
 * @since 16.0.0
30
 */
31
class AutoCompleteEvent extends GenericEvent {
32
33
	/**
34
	 * @param array $arguments
35
	 * @since 16.0.0
36
	 */
37
	public function __construct(array $arguments) {
38
		parent::__construct(null, $arguments);
39
	}
40
41
	/**
42
	 * @since 16.0.0
43
	 */
44
	public function getResults(): array {
45
		return $this->getArgument('results');
46
	}
47
48
	/**
49
	 * @param array $results
50
	 * @since 16.0.0
51
	 */
52
	public function setResults(array $results): void {
53
		$this->setArgument('results', $results);
54
	}
55
56
	/**
57
	 * @since 16.0.0
58
	 */
59
	public function getSearchTerm(): string {
60
		return $this->getArgument('search');
61
	}
62
63
	/**
64
	 * @return int[]
65
	 * @since 16.0.0
66
	 */
67
	public function getShareTypes(): array {
68
		return $this->getArgument('shareTypes');
69
	}
70
71
	/**
72
	 * @since 16.0.0
73
	 */
74
	public function getItemType(): string {
75
		return $this->getArgument('itemType');
76
	}
77
78
	/**
79
	 * @since 16.0.0
80
	 */
81
	public function getItemId(): string {
82
		return $this->getArgument('itemId');
83
	}
84
85
	/**
86
	 * @since 16.0.0
87
	 */
88
	public function getSorter(): string {
89
		return $this->getArgument('sorter');
90
	}
91
92
	/**
93
	 * @since 16.0.0
94
	 */
95
	public function getLimit(): int {
96
		return $this->getArgument('limit');
97
	}
98
99
}
100