@@ -67,6 +67,9 @@ |
||
67 | 67 | $event->setResponse($response); |
68 | 68 | } |
69 | 69 | |
70 | + /** |
|
71 | + * @param Request $request |
|
72 | + */ |
|
70 | 73 | private function isInterceptionPath(?Request $request): bool |
71 | 74 | { |
72 | 75 | if (null === $request) { |
@@ -95,6 +95,10 @@ |
||
95 | 95 | return null; |
96 | 96 | } |
97 | 97 | |
98 | + /** |
|
99 | + * @param string $currentPath |
|
100 | + * @param string[] $includes |
|
101 | + */ |
|
98 | 102 | private function isIncluded($currentPath, array $paths, ?array $includes): bool |
99 | 103 | { |
100 | 104 | if (null === $includes) { |
@@ -164,6 +164,9 @@ |
||
164 | 164 | return false; |
165 | 165 | } |
166 | 166 | |
167 | + /** |
|
168 | + * @param string|null $type |
|
169 | + */ |
|
167 | 170 | private function convert(?string $type, $value) |
168 | 171 | { |
169 | 172 | if (null === $value) { |
@@ -255,6 +255,9 @@ discard block |
||
255 | 255 | return $this->getService()->update($entity); |
256 | 256 | } |
257 | 257 | |
258 | + /** |
|
259 | + * @param string|null $property |
|
260 | + */ |
|
258 | 261 | protected function listSubresource($entity, $property, $page = 1, $perPage = 50): Paginator |
259 | 262 | { |
260 | 263 | $service = $this->getService(); |
@@ -272,6 +275,9 @@ discard block |
||
272 | 275 | return Inflector::tableize($this->getClassMetadata()->reflection->getShortName()); |
273 | 276 | } |
274 | 277 | |
278 | + /** |
|
279 | + * @return string |
|
280 | + */ |
|
275 | 281 | protected function getServiceId() |
276 | 282 | { |
277 | 283 | return $this->getCurrentRequest()->attributes->get('_service'); |
@@ -337,6 +343,9 @@ discard block |
||
337 | 343 | $this->assertRightGranted($entity, $right); |
338 | 344 | } |
339 | 345 | |
346 | + /** |
|
347 | + * @param string|null $subresource |
|
348 | + */ |
|
340 | 349 | protected function assertSubresourceListGranted($entity, $subresource) |
341 | 350 | { |
342 | 351 | $classMetadata = $this->getClassMetadata(); |
@@ -350,6 +359,9 @@ discard block |
||
350 | 359 | $this->assertRightGranted($entity, $right); |
351 | 360 | } |
352 | 361 | |
362 | + /** |
|
363 | + * @param string|null $subresource |
|
364 | + */ |
|
353 | 365 | protected function assertSubresourcePostGranted($entity, $subresource) |
354 | 366 | { |
355 | 367 | $classMetadata = $this->getClassMetadata(); |
@@ -363,6 +375,9 @@ discard block |
||
363 | 375 | $this->assertRightGranted($entity, $right); |
364 | 376 | } |
365 | 377 | |
378 | + /** |
|
379 | + * @param string|null $subresource |
|
380 | + */ |
|
366 | 381 | protected function assertSubresourcePutGranted($entity, $subresource) |
367 | 382 | { |
368 | 383 | $classMetadata = $this->getClassMetadata(); |
@@ -376,6 +391,9 @@ discard block |
||
376 | 391 | $this->assertRightGranted($entity, $right); |
377 | 392 | } |
378 | 393 | |
394 | + /** |
|
395 | + * @param string|null $subresource |
|
396 | + */ |
|
379 | 397 | protected function assertSubresourceDeleteGranted($entity, $subresource) |
380 | 398 | { |
381 | 399 | $classMetadata = $this->getClassMetadata(); |
@@ -401,6 +419,9 @@ discard block |
||
401 | 419 | return $classMetaData; |
402 | 420 | } |
403 | 421 | |
422 | + /** |
|
423 | + * @param string|null $subresource |
|
424 | + */ |
|
404 | 425 | protected function getSubResourceEntityClass($subresource) |
405 | 426 | { |
406 | 427 | /** @var PropertyMetadata $propertyMetadata */ |
@@ -409,6 +430,9 @@ discard block |
||
409 | 430 | return $propertyMetadata->getTargetClass(); |
410 | 431 | } |
411 | 432 | |
433 | + /** |
|
434 | + * @param string $propertyPath |
|
435 | + */ |
|
412 | 436 | protected function resolveSubject($entity, $propertyPath) |
413 | 437 | { |
414 | 438 | if ('this' === $propertyPath) { |