@@ -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) { |
@@ -354,6 +354,9 @@ |
||
354 | 354 | return $this; |
355 | 355 | } |
356 | 356 | |
357 | + /** |
|
358 | + * @param boolean $value |
|
359 | + */ |
|
357 | 360 | protected function getBool(?bool $value, bool $default) |
358 | 361 | { |
359 | 362 | if (null === $value) { |
@@ -44,6 +44,9 @@ |
||
44 | 44 | */ |
45 | 45 | public $methods; |
46 | 46 | |
47 | + /** |
|
48 | + * @param string $name |
|
49 | + */ |
|
47 | 50 | public function __construct($name) |
48 | 51 | { |
49 | 52 | parent::__construct($name); |
@@ -144,6 +144,10 @@ |
||
144 | 144 | return $data; |
145 | 145 | } |
146 | 146 | |
147 | + /** |
|
148 | + * @param string $currentPath |
|
149 | + * @param string[] $includes |
|
150 | + */ |
|
147 | 151 | private function isIncluded($currentPath, array $paths, ?array $includes): bool |
148 | 152 | { |
149 | 153 | if (null === $includes) { |
@@ -310,6 +310,9 @@ discard block |
||
310 | 310 | return $this->getService()->findAssociationPaginated($entity, $property, $page, $perPage); |
311 | 311 | } |
312 | 312 | |
313 | + /** |
|
314 | + * @return string |
|
315 | + */ |
|
313 | 316 | protected function getEntityClass() |
314 | 317 | { |
315 | 318 | return $this->getCurrentRequest()->attributes->get('_entityClass'); |
@@ -320,6 +323,9 @@ discard block |
||
320 | 323 | return Inflector::tableize($this->getClassMetadata()->reflection->getShortName()); |
321 | 324 | } |
322 | 325 | |
326 | + /** |
|
327 | + * @return string |
|
328 | + */ |
|
323 | 329 | protected function getServiceId() |
324 | 330 | { |
325 | 331 | return $this->getCurrentRequest()->attributes->get('_service'); |
@@ -370,6 +376,9 @@ discard block |
||
370 | 376 | } |
371 | 377 | } |
372 | 378 | |
379 | + /** |
|
380 | + * @param string $subresource |
|
381 | + */ |
|
373 | 382 | protected function assertSubresourceListGranted($entity, $subresource) |
374 | 383 | { |
375 | 384 | $classMetadata = $this->getClassMetadata(); |
@@ -384,6 +393,9 @@ discard block |
||
384 | 393 | $this->assertRightGranted($entity, $right); |
385 | 394 | } |
386 | 395 | |
396 | + /** |
|
397 | + * @param string $subresource |
|
398 | + */ |
|
387 | 399 | protected function assertSubresourcePostGranted($entity, $subresource) |
388 | 400 | { |
389 | 401 | $classMetadata = $this->getClassMetadata(); |
@@ -398,6 +410,9 @@ discard block |
||
398 | 410 | $this->assertRightGranted($entity, $right); |
399 | 411 | } |
400 | 412 | |
413 | + /** |
|
414 | + * @param string $subresource |
|
415 | + */ |
|
401 | 416 | protected function assertSubresourcePutGranted($entity, $subresource) |
402 | 417 | { |
403 | 418 | $classMetadata = $this->getClassMetadata(); |
@@ -409,6 +424,9 @@ discard block |
||
409 | 424 | } |
410 | 425 | } |
411 | 426 | |
427 | + /** |
|
428 | + * @param string $subresource |
|
429 | + */ |
|
412 | 430 | protected function assertSubresourceDeleteGranted($entity, $subresource) |
413 | 431 | { |
414 | 432 | $classMetadata = $this->getClassMetadata(); |
@@ -432,6 +450,9 @@ discard block |
||
432 | 450 | return $classMetaData; |
433 | 451 | } |
434 | 452 | |
453 | + /** |
|
454 | + * @param string $subresource |
|
455 | + */ |
|
435 | 456 | protected function getSubResourceEntityClass($subresource) |
436 | 457 | { |
437 | 458 | /** @var PropertyMetadata $propertyMetadata */ |
@@ -440,6 +461,9 @@ discard block |
||
440 | 461 | return $propertyMetadata->getType(); |
441 | 462 | } |
442 | 463 | |
464 | + /** |
|
465 | + * @param string $propertyPath |
|
466 | + */ |
|
443 | 467 | protected function resolveSubject($entity, $propertyPath) |
444 | 468 | { |
445 | 469 | if ('this' === $propertyPath) { |
@@ -529,6 +553,9 @@ discard block |
||
529 | 553 | ); |
530 | 554 | } |
531 | 555 | |
556 | + /** |
|
557 | + * @param string[] $attributes |
|
558 | + */ |
|
532 | 559 | protected function denyAccessUnlessGranted($attributes, $object = null, $message = 'Access Denied.') |
533 | 560 | { |
534 | 561 | if (!$this->getAuthorizationChecker()->isGranted($attributes, $object)) { |