1 | <?php |
||
9 | class ClassMetadata extends MergeableClassMetadata |
||
10 | { |
||
11 | /** |
||
12 | * @var bool |
||
13 | */ |
||
14 | public $restResource; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | public $namePrefix; |
||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | public $pathPrefix; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | public $service; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | public $controller; |
||
35 | |||
36 | /** |
||
37 | * @var Right|null |
||
38 | */ |
||
39 | public $postRight; |
||
40 | |||
41 | /** |
||
42 | * @var Right|null |
||
43 | */ |
||
44 | public $putRight; |
||
45 | |||
46 | /** |
||
47 | * @var Right|null |
||
48 | */ |
||
49 | public $deleteRight; |
||
50 | |||
51 | /** |
||
52 | * @var Right|null |
||
53 | */ |
||
54 | public $listRight; |
||
55 | |||
56 | /** |
||
57 | * @var Right|null |
||
58 | */ |
||
59 | public $getRight; |
||
60 | |||
61 | /** |
||
62 | * @var string[] |
||
63 | */ |
||
64 | public $methods = ['LIST', 'POST', 'GET', 'PUT', 'DELETE']; |
||
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | 6 | public function merge(MergeableInterface $object) |
|
98 | |||
99 | /** |
||
100 | * @param bool $restResource |
||
101 | */ |
||
102 | 38 | public function setRestResource($restResource) |
|
106 | |||
107 | /** |
||
108 | * @return boolean |
||
109 | */ |
||
110 | 4 | public function isRestResource() |
|
114 | |||
115 | /** |
||
116 | * @return string |
||
117 | */ |
||
118 | 4 | public function getNamePrefix() |
|
122 | |||
123 | /** |
||
124 | * @param string $namePrefix |
||
125 | */ |
||
126 | public function setNamePrefix($namePrefix) |
||
130 | |||
131 | /** |
||
132 | * @return string |
||
133 | */ |
||
134 | 4 | public function getPathPrefix() |
|
138 | |||
139 | /** |
||
140 | * @param string $pathPrefix |
||
141 | */ |
||
142 | 24 | public function setPathPrefix(string $pathPrefix) |
|
146 | |||
147 | /** |
||
148 | * @return string |
||
149 | */ |
||
150 | 4 | public function getController() |
|
154 | |||
155 | /** |
||
156 | * @param string $controller |
||
157 | */ |
||
158 | public function setController($controller) |
||
162 | |||
163 | /** |
||
164 | * @return string |
||
165 | */ |
||
166 | 4 | public function getService() |
|
170 | |||
171 | /** |
||
172 | * @param string $service |
||
173 | */ |
||
174 | 4 | public function setService($service) |
|
178 | |||
179 | /** |
||
180 | * @return Right|null |
||
181 | */ |
||
182 | 2 | public function getDeleteRight() |
|
186 | |||
187 | /** |
||
188 | * @param Right|null $deleteRight |
||
189 | */ |
||
190 | public function setDeleteRight(Right $deleteRight) |
||
194 | |||
195 | /** |
||
196 | * @return Right|null |
||
197 | */ |
||
198 | 2 | public function getPostRight() |
|
202 | |||
203 | /** |
||
204 | * @param Right|null $postRight |
||
205 | */ |
||
206 | public function setPostRight(Right $postRight) |
||
210 | |||
211 | /** |
||
212 | * @return Right|null |
||
213 | */ |
||
214 | 6 | public function getPutRight() |
|
218 | |||
219 | /** |
||
220 | * @param Right|null $putRight |
||
221 | */ |
||
222 | 24 | public function setPutRight(Right $putRight) |
|
226 | |||
227 | /** |
||
228 | * @return Right|null |
||
229 | */ |
||
230 | 8 | public function getListRight() |
|
234 | |||
235 | /** |
||
236 | * @param Right|null $listRight |
||
237 | */ |
||
238 | 24 | public function setListRight(Right $listRight) |
|
242 | |||
243 | /** |
||
244 | * @return Right|null |
||
245 | */ |
||
246 | 10 | public function getGetRight() |
|
250 | |||
251 | /** |
||
252 | * @param Right|null $getRight |
||
253 | */ |
||
254 | 24 | public function setGetRight(Right $getRight) |
|
258 | |||
259 | /** |
||
260 | * @return string[] |
||
261 | */ |
||
262 | 4 | public function getMethods() |
|
266 | |||
267 | /** |
||
268 | * @param string[] $methods |
||
269 | */ |
||
270 | public function setMethods(array $methods) |
||
274 | |||
275 | 38 | public function getPropertyMetadata(string $property): ?PropertyMetadata |
|
283 | |||
284 | /** |
||
285 | * @param MergeableInterface $object |
||
286 | * |
||
287 | * @return array |
||
288 | */ |
||
289 | 6 | protected function mergePropertyMetadata(MergeableInterface $object): array |
|
306 | } |
||
307 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: