|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* FullTextSearch - Full text search framework for Nextcloud |
|
4
|
|
|
* |
|
5
|
|
|
* This file is licensed under the Affero General Public License version 3 or |
|
6
|
|
|
* later. See the COPYING file. |
|
7
|
|
|
* |
|
8
|
|
|
* @author Maxence Lange <[email protected]> |
|
9
|
|
|
* @copyright 2018 |
|
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
|
|
|
|
|
27
|
|
|
|
|
28
|
|
|
namespace OCA\FullTextSearch\Model; |
|
29
|
|
|
|
|
30
|
|
|
|
|
31
|
|
|
use OCA\FullTextSearch\IFullTextSearchPlatform; |
|
32
|
|
|
|
|
33
|
|
|
|
|
34
|
|
|
/** |
|
35
|
|
|
* Class PlatformWrapper |
|
36
|
|
|
* |
|
37
|
|
|
* @package OCA\FullTextSearch\Model |
|
38
|
|
|
*/ |
|
39
|
|
|
class PlatformWrapper { |
|
40
|
|
|
|
|
41
|
|
|
|
|
42
|
|
|
/** @var string */ |
|
43
|
|
|
private $appId; |
|
44
|
|
|
|
|
45
|
|
|
/** @var string */ |
|
46
|
|
|
private $class; |
|
47
|
|
|
|
|
48
|
|
|
/** @var IFullTextSearchPlatform */ |
|
49
|
|
|
private $platform; |
|
50
|
|
|
|
|
51
|
|
|
/** @var string */ |
|
52
|
|
|
private $version; |
|
53
|
|
|
|
|
54
|
|
|
|
|
55
|
|
|
/** |
|
56
|
|
|
* Provider constructor. |
|
57
|
|
|
* |
|
58
|
|
|
* @param string $appId |
|
59
|
|
|
* @param IFullTextSearchPlatform $platform |
|
|
|
|
|
|
60
|
|
|
*/ |
|
61
|
|
|
public function __construct($appId, $class) { |
|
62
|
|
|
$this->appId = $appId; |
|
63
|
|
|
$this->class = $class; |
|
64
|
|
|
} |
|
65
|
|
|
|
|
66
|
|
|
/** |
|
67
|
|
|
* @return string |
|
68
|
|
|
*/ |
|
69
|
|
|
public function getAppId() { |
|
70
|
|
|
return $this->appId; |
|
71
|
|
|
} |
|
72
|
|
|
|
|
73
|
|
|
/** |
|
74
|
|
|
* @param string $appId |
|
75
|
|
|
* |
|
76
|
|
|
* @return PlatformWrapper |
|
77
|
|
|
*/ |
|
78
|
|
|
public function setAppId($appId) { |
|
79
|
|
|
$this->appId = $appId; |
|
80
|
|
|
|
|
81
|
|
|
return $this; |
|
82
|
|
|
} |
|
83
|
|
|
|
|
84
|
|
|
|
|
85
|
|
|
/** |
|
86
|
|
|
* @return string |
|
87
|
|
|
*/ |
|
88
|
|
|
public function getClass() { |
|
89
|
|
|
return $this->class; |
|
90
|
|
|
} |
|
91
|
|
|
|
|
92
|
|
|
/** |
|
93
|
|
|
* @param string $class |
|
94
|
|
|
* |
|
95
|
|
|
* @return PlatformWrapper |
|
96
|
|
|
*/ |
|
97
|
|
|
public function setClass($class) { |
|
98
|
|
|
$this->class = $class; |
|
99
|
|
|
|
|
100
|
|
|
return $this; |
|
101
|
|
|
} |
|
102
|
|
|
|
|
103
|
|
|
|
|
104
|
|
|
/** |
|
105
|
|
|
* @return IFullTextSearchPlatform |
|
106
|
|
|
*/ |
|
107
|
|
|
public function getPlatform() { |
|
108
|
|
|
return $this->platform; |
|
109
|
|
|
} |
|
110
|
|
|
|
|
111
|
|
|
/** |
|
112
|
|
|
* @param IFullTextSearchPlatform $platform |
|
113
|
|
|
* |
|
114
|
|
|
* @return PlatformWrapper |
|
115
|
|
|
*/ |
|
116
|
|
|
public function setPlatform($platform) { |
|
117
|
|
|
$this->platform = $platform; |
|
118
|
|
|
|
|
119
|
|
|
return $this; |
|
120
|
|
|
} |
|
121
|
|
|
|
|
122
|
|
|
|
|
123
|
|
|
/** |
|
124
|
|
|
* @return string |
|
125
|
|
|
*/ |
|
126
|
|
|
public function getVersion() { |
|
127
|
|
|
return $this->version; |
|
128
|
|
|
} |
|
129
|
|
|
|
|
130
|
|
|
/** |
|
131
|
|
|
* @param string $version |
|
132
|
|
|
* |
|
133
|
|
|
* @return PlatformWrapper |
|
134
|
|
|
*/ |
|
135
|
|
|
public function setVersion($version) { |
|
136
|
|
|
$this->version = $version; |
|
137
|
|
|
|
|
138
|
|
|
return $this; |
|
139
|
|
|
} |
|
140
|
|
|
|
|
141
|
|
|
|
|
142
|
|
|
} |
|
143
|
|
|
|
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.