@@ -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) { |
@@ -235,6 +235,9 @@ discard block |
||
| 235 | 235 | return $this->getService()->update($entity); |
| 236 | 236 | } |
| 237 | 237 | |
| 238 | + /** |
|
| 239 | + * @param string|null $property |
|
| 240 | + */ |
|
| 238 | 241 | protected function listSubresource($entity, $property, $page = 1, $perPage = 50): Paginator |
| 239 | 242 | { |
| 240 | 243 | $service = $this->getService(); |
@@ -252,6 +255,9 @@ discard block |
||
| 252 | 255 | return Inflector::tableize($this->getClassMetadata()->reflection->getShortName()); |
| 253 | 256 | } |
| 254 | 257 | |
| 258 | + /** |
|
| 259 | + * @return string |
|
| 260 | + */ |
|
| 255 | 261 | protected function getServiceId() |
| 256 | 262 | { |
| 257 | 263 | return $this->getCurrentRequest()->attributes->get('_service'); |
@@ -317,6 +323,9 @@ discard block |
||
| 317 | 323 | $this->assertRightGranted($entity, $right); |
| 318 | 324 | } |
| 319 | 325 | |
| 326 | + /** |
|
| 327 | + * @param string|null $subresource |
|
| 328 | + */ |
|
| 320 | 329 | protected function assertSubresourceListGranted($entity, $subresource) |
| 321 | 330 | { |
| 322 | 331 | $classMetadata = $this->getClassMetadata(); |
@@ -330,6 +339,9 @@ discard block |
||
| 330 | 339 | $this->assertRightGranted($entity, $right); |
| 331 | 340 | } |
| 332 | 341 | |
| 342 | + /** |
|
| 343 | + * @param string|null $subresource |
|
| 344 | + */ |
|
| 333 | 345 | protected function assertSubresourcePostGranted($entity, $subresource) |
| 334 | 346 | { |
| 335 | 347 | $classMetadata = $this->getClassMetadata(); |
@@ -355,6 +367,9 @@ discard block |
||
| 355 | 367 | return $classMetaData; |
| 356 | 368 | } |
| 357 | 369 | |
| 370 | + /** |
|
| 371 | + * @param string|null $subresource |
|
| 372 | + */ |
|
| 358 | 373 | protected function getSubResourceEntityClass($subresource) |
| 359 | 374 | { |
| 360 | 375 | /** @var PropertyMetadata $propertyMetadata */ |
@@ -363,6 +378,9 @@ discard block |
||
| 363 | 378 | return $propertyMetadata->getTargetClass(); |
| 364 | 379 | } |
| 365 | 380 | |
| 381 | + /** |
|
| 382 | + * @param string $propertyPath |
|
| 383 | + */ |
|
| 366 | 384 | protected function resolveSubject($entity, $propertyPath) |
| 367 | 385 | { |
| 368 | 386 | if ('this' === $propertyPath) { |