@@ -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) { | 
                                                        
@@ -185,7 +185,7 @@ discard block  | 
                                                    ||
| 185 | 185 | }  | 
                                                        
| 186 | 186 | |
| 187 | 187 | /**  | 
                                                        
| 188 | - * @param Right|null $deleteRight  | 
                                                        |
| 188 | + * @param Right $deleteRight  | 
                                                        |
| 189 | 189 | */  | 
                                                        
| 190 | 190 | public function setDeleteRight(Right $deleteRight)  | 
                                                        
| 191 | 191 |      { | 
                                                        
@@ -201,7 +201,7 @@ discard block  | 
                                                    ||
| 201 | 201 | }  | 
                                                        
| 202 | 202 | |
| 203 | 203 | /**  | 
                                                        
| 204 | - * @param Right|null $postRight  | 
                                                        |
| 204 | + * @param Right $postRight  | 
                                                        |
| 205 | 205 | */  | 
                                                        
| 206 | 206 | public function setPostRight(Right $postRight)  | 
                                                        
| 207 | 207 |      { | 
                                                        
@@ -217,7 +217,7 @@ discard block  | 
                                                    ||
| 217 | 217 | }  | 
                                                        
| 218 | 218 | |
| 219 | 219 | /**  | 
                                                        
| 220 | - * @param Right|null $putRight  | 
                                                        |
| 220 | + * @param Right $putRight  | 
                                                        |
| 221 | 221 | */  | 
                                                        
| 222 | 222 | public function setPutRight(Right $putRight)  | 
                                                        
| 223 | 223 |      { | 
                                                        
@@ -233,7 +233,7 @@ discard block  | 
                                                    ||
| 233 | 233 | }  | 
                                                        
| 234 | 234 | |
| 235 | 235 | /**  | 
                                                        
| 236 | - * @param Right|null $listRight  | 
                                                        |
| 236 | + * @param Right $listRight  | 
                                                        |
| 237 | 237 | */  | 
                                                        
| 238 | 238 | public function setListRight(Right $listRight)  | 
                                                        
| 239 | 239 |      { | 
                                                        
@@ -249,7 +249,7 @@ discard block  | 
                                                    ||
| 249 | 249 | }  | 
                                                        
| 250 | 250 | |
| 251 | 251 | /**  | 
                                                        
| 252 | - * @param Right|null $getRight  | 
                                                        |
| 252 | + * @param Right $getRight  | 
                                                        |
| 253 | 253 | */  | 
                                                        
| 254 | 254 | public function setGetRight(Right $getRight)  | 
                                                        
| 255 | 255 |      { | 
                                                        
@@ -272,6 +272,9 @@ discard block  | 
                                                    ||
| 272 | 272 | $this->methods = $methods;  | 
                                                        
| 273 | 273 | }  | 
                                                        
| 274 | 274 | |
| 275 | + /**  | 
                                                        |
| 276 | + * @return \Metadata\PropertyMetadata  | 
                                                        |
| 277 | + */  | 
                                                        |
| 275 | 278 | public function getPropertyMetadata(string $property): ?PropertyMetadata  | 
                                                        
| 276 | 279 |      { | 
                                                        
| 277 | 280 |          if (array_key_exists($property, $this->propertyMetadata)) { | 
                                                        
@@ -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) { | 
                                                        
@@ -316,6 +316,9 @@ discard block  | 
                                                    ||
| 316 | 316 | return $this->getService()->findAssociationPaginated($entity, $property, $page, $perPage);  | 
                                                        
| 317 | 317 | }  | 
                                                        
| 318 | 318 | |
| 319 | + /**  | 
                                                        |
| 320 | + * @return string  | 
                                                        |
| 321 | + */  | 
                                                        |
| 319 | 322 | protected function getEntityClass()  | 
                                                        
| 320 | 323 |      { | 
                                                        
| 321 | 324 |          return $this->getCurrentRequest()->attributes->get('_entityClass'); | 
                                                        
@@ -326,6 +329,9 @@ discard block  | 
                                                    ||
| 326 | 329 | return Inflector::tableize($this->getClassMetadata()->reflection->getShortName());  | 
                                                        
| 327 | 330 | }  | 
                                                        
| 328 | 331 | |
| 332 | + /**  | 
                                                        |
| 333 | + * @return string  | 
                                                        |
| 334 | + */  | 
                                                        |
| 329 | 335 | protected function getServiceId()  | 
                                                        
| 330 | 336 |      { | 
                                                        
| 331 | 337 |          return $this->getCurrentRequest()->attributes->get('_service'); | 
                                                        
@@ -391,6 +397,9 @@ discard block  | 
                                                    ||
| 391 | 397 | $this->assertRightGranted($entity, $right);  | 
                                                        
| 392 | 398 | }  | 
                                                        
| 393 | 399 | |
| 400 | + /**  | 
                                                        |
| 401 | + * @param string|null $subresource  | 
                                                        |
| 402 | + */  | 
                                                        |
| 394 | 403 | protected function assertSubresourceListGranted($entity, $subresource)  | 
                                                        
| 395 | 404 |      { | 
                                                        
| 396 | 405 | $classMetadata = $this->getClassMetadata();  | 
                                                        
@@ -404,6 +413,9 @@ discard block  | 
                                                    ||
| 404 | 413 | $this->assertRightGranted($entity, $right);  | 
                                                        
| 405 | 414 | }  | 
                                                        
| 406 | 415 | |
| 416 | + /**  | 
                                                        |
| 417 | + * @param string|null $subresource  | 
                                                        |
| 418 | + */  | 
                                                        |
| 407 | 419 | protected function assertSubresourcePostGranted($entity, $subresource)  | 
                                                        
| 408 | 420 |      { | 
                                                        
| 409 | 421 | $classMetadata = $this->getClassMetadata();  | 
                                                        
@@ -417,6 +429,9 @@ discard block  | 
                                                    ||
| 417 | 429 | $this->assertRightGranted($entity, $right);  | 
                                                        
| 418 | 430 | }  | 
                                                        
| 419 | 431 | |
| 432 | + /**  | 
                                                        |
| 433 | + * @param string|null $subresource  | 
                                                        |
| 434 | + */  | 
                                                        |
| 420 | 435 | protected function assertSubresourcePutGranted($entity, $subresource)  | 
                                                        
| 421 | 436 |      { | 
                                                        
| 422 | 437 | $classMetadata = $this->getClassMetadata();  | 
                                                        
@@ -430,6 +445,9 @@ discard block  | 
                                                    ||
| 430 | 445 | $this->assertRightGranted($entity, $right);  | 
                                                        
| 431 | 446 | }  | 
                                                        
| 432 | 447 | |
| 448 | + /**  | 
                                                        |
| 449 | + * @param string|null $subresource  | 
                                                        |
| 450 | + */  | 
                                                        |
| 433 | 451 | protected function assertSubresourceDeleteGranted($entity, $subresource)  | 
                                                        
| 434 | 452 |      { | 
                                                        
| 435 | 453 | $classMetadata = $this->getClassMetadata();  | 
                                                        
@@ -455,6 +473,9 @@ discard block  | 
                                                    ||
| 455 | 473 | return $classMetaData;  | 
                                                        
| 456 | 474 | }  | 
                                                        
| 457 | 475 | |
| 476 | + /**  | 
                                                        |
| 477 | + * @param string|null $subresource  | 
                                                        |
| 478 | + */  | 
                                                        |
| 458 | 479 | protected function getSubResourceEntityClass($subresource)  | 
                                                        
| 459 | 480 |      { | 
                                                        
| 460 | 481 | /** @var PropertyMetadata $propertyMetadata */  | 
                                                        
@@ -463,6 +484,9 @@ discard block  | 
                                                    ||
| 463 | 484 | return $propertyMetadata->getType();  | 
                                                        
| 464 | 485 | }  | 
                                                        
| 465 | 486 | |
| 487 | + /**  | 
                                                        |
| 488 | + * @param string $propertyPath  | 
                                                        |
| 489 | + */  | 
                                                        |
| 466 | 490 | protected function resolveSubject($entity, $propertyPath)  | 
                                                        
| 467 | 491 |      { | 
                                                        
| 468 | 492 |          if ('this' === $propertyPath) { | 
                                                        
@@ -545,6 +569,9 @@ discard block  | 
                                                    ||
| 545 | 569 | );  | 
                                                        
| 546 | 570 | }  | 
                                                        
| 547 | 571 | |
| 572 | + /**  | 
                                                        |
| 573 | + * @param string[] $attributes  | 
                                                        |
| 574 | + */  | 
                                                        |
| 548 | 575 | protected function denyAccessUnlessGranted($attributes, $object = null, $message = 'Access Denied.')  | 
                                                        
| 549 | 576 |      { | 
                                                        
| 550 | 577 |          if (!$this->getAuthorizationChecker()->isGranted($attributes, $object)) { |