@@ -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) { |
@@ -308,6 +308,9 @@ discard block |
||
308 | 308 | return Inflector::tableize($this->getClassMetadata()->reflection->getShortName()); |
309 | 309 | } |
310 | 310 | |
311 | + /** |
|
312 | + * @return string |
|
313 | + */ |
|
311 | 314 | protected function getServiceId() |
312 | 315 | { |
313 | 316 | return $this->getCurrentRequest()->attributes->get('_service'); |
@@ -373,6 +376,9 @@ discard block |
||
373 | 376 | $this->assertRightGranted($entity, $right); |
374 | 377 | } |
375 | 378 | |
379 | + /** |
|
380 | + * @param string|null $subresource |
|
381 | + */ |
|
376 | 382 | protected function assertSubresourceListGranted($entity, $subresource) |
377 | 383 | { |
378 | 384 | $classMetadata = $this->getClassMetadata(); |
@@ -386,6 +392,9 @@ discard block |
||
386 | 392 | $this->assertRightGranted($entity, $right); |
387 | 393 | } |
388 | 394 | |
395 | + /** |
|
396 | + * @param string|null $subresource |
|
397 | + */ |
|
389 | 398 | protected function assertSubresourcePostGranted($entity, $subresource) |
390 | 399 | { |
391 | 400 | $classMetadata = $this->getClassMetadata(); |
@@ -399,6 +408,9 @@ discard block |
||
399 | 408 | $this->assertRightGranted($entity, $right); |
400 | 409 | } |
401 | 410 | |
411 | + /** |
|
412 | + * @param string|null $subresource |
|
413 | + */ |
|
402 | 414 | protected function assertSubresourcePutGranted($entity, $subresource) |
403 | 415 | { |
404 | 416 | $classMetadata = $this->getClassMetadata(); |
@@ -412,6 +424,9 @@ discard block |
||
412 | 424 | $this->assertRightGranted($entity, $right); |
413 | 425 | } |
414 | 426 | |
427 | + /** |
|
428 | + * @param string|null $subresource |
|
429 | + */ |
|
415 | 430 | protected function assertSubresourceDeleteGranted($entity, $subresource) |
416 | 431 | { |
417 | 432 | $classMetadata = $this->getClassMetadata(); |
@@ -437,6 +452,9 @@ discard block |
||
437 | 452 | return $classMetaData; |
438 | 453 | } |
439 | 454 | |
455 | + /** |
|
456 | + * @param string|null $subresource |
|
457 | + */ |
|
440 | 458 | protected function getSubResourceEntityClass($subresource) |
441 | 459 | { |
442 | 460 | /** @var PropertyMetadata $propertyMetadata */ |
@@ -445,6 +463,9 @@ discard block |
||
445 | 463 | return $propertyMetadata->getTargetClass(); |
446 | 464 | } |
447 | 465 | |
466 | + /** |
|
467 | + * @param string $propertyPath |
|
468 | + */ |
|
448 | 469 | protected function resolveSubject($entity, $propertyPath) |
449 | 470 | { |
450 | 471 | if ('this' === $propertyPath) { |