@@ -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) { |
@@ -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) { |
@@ -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) { |
@@ -317,6 +317,9 @@ discard block |
||
| 317 | 317 | return $this->getService()->findAssociationPaginated($entity, $property, $page, $perPage); |
| 318 | 318 | } |
| 319 | 319 | |
| 320 | + /** |
|
| 321 | + * @return string |
|
| 322 | + */ |
|
| 320 | 323 | protected function getEntityClass() |
| 321 | 324 | { |
| 322 | 325 | return $this->getCurrentRequest()->attributes->get('_entityClass'); |
@@ -327,6 +330,9 @@ discard block |
||
| 327 | 330 | return Inflector::tableize($this->getClassMetadata()->reflection->getShortName()); |
| 328 | 331 | } |
| 329 | 332 | |
| 333 | + /** |
|
| 334 | + * @return string |
|
| 335 | + */ |
|
| 330 | 336 | protected function getServiceId() |
| 331 | 337 | { |
| 332 | 338 | return $this->getCurrentRequest()->attributes->get('_service'); |
@@ -380,6 +386,9 @@ discard block |
||
| 380 | 386 | } |
| 381 | 387 | } |
| 382 | 388 | |
| 389 | + /** |
|
| 390 | + * @param string|null $subresource |
|
| 391 | + */ |
|
| 383 | 392 | protected function assertSubresourceListGranted($entity, $subresource) |
| 384 | 393 | { |
| 385 | 394 | $classMetadata = $this->getClassMetadata(); |
@@ -394,6 +403,9 @@ discard block |
||
| 394 | 403 | $this->assertRightGranted($entity, $right); |
| 395 | 404 | } |
| 396 | 405 | |
| 406 | + /** |
|
| 407 | + * @param string|null $subresource |
|
| 408 | + */ |
|
| 397 | 409 | protected function assertSubresourcePostGranted($entity, $subresource) |
| 398 | 410 | { |
| 399 | 411 | $classMetadata = $this->getClassMetadata(); |
@@ -408,6 +420,9 @@ discard block |
||
| 408 | 420 | $this->assertRightGranted($entity, $right); |
| 409 | 421 | } |
| 410 | 422 | |
| 423 | + /** |
|
| 424 | + * @param string|null $subresource |
|
| 425 | + */ |
|
| 411 | 426 | protected function assertSubresourcePutGranted($entity, $subresource) |
| 412 | 427 | { |
| 413 | 428 | $classMetadata = $this->getClassMetadata(); |
@@ -419,6 +434,9 @@ discard block |
||
| 419 | 434 | } |
| 420 | 435 | } |
| 421 | 436 | |
| 437 | + /** |
|
| 438 | + * @param string|null $subresource |
|
| 439 | + */ |
|
| 422 | 440 | protected function assertSubresourceDeleteGranted($entity, $subresource) |
| 423 | 441 | { |
| 424 | 442 | $classMetadata = $this->getClassMetadata(); |
@@ -442,6 +460,9 @@ discard block |
||
| 442 | 460 | return $classMetaData; |
| 443 | 461 | } |
| 444 | 462 | |
| 463 | + /** |
|
| 464 | + * @param string|null $subresource |
|
| 465 | + */ |
|
| 445 | 466 | protected function getSubResourceEntityClass($subresource) |
| 446 | 467 | { |
| 447 | 468 | /** @var PropertyMetadata $propertyMetadata */ |
@@ -450,6 +471,9 @@ discard block |
||
| 450 | 471 | return $propertyMetadata->getType(); |
| 451 | 472 | } |
| 452 | 473 | |
| 474 | + /** |
|
| 475 | + * @param string $propertyPath |
|
| 476 | + */ |
|
| 453 | 477 | protected function resolveSubject($entity, $propertyPath) |
| 454 | 478 | { |
| 455 | 479 | if ('this' === $propertyPath) { |
@@ -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) { |