@@ -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,11 +310,17 @@ 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'); |
316 | 319 | } |
317 | 320 | |
321 | + /** |
|
322 | + * @param string $subresource |
|
323 | + */ |
|
318 | 324 | protected function getSubResourceEntityClass($subresource) |
319 | 325 | { |
320 | 326 | /** @var PropertyMetadata $propertyMetadata */ |
@@ -323,6 +329,9 @@ discard block |
||
323 | 329 | return $propertyMetadata->getType(); |
324 | 330 | } |
325 | 331 | |
332 | + /** |
|
333 | + * @return string |
|
334 | + */ |
|
326 | 335 | protected function getServiceId() |
327 | 336 | { |
328 | 337 | return $this->getCurrentRequest()->attributes->get('_service'); |
@@ -369,6 +378,9 @@ discard block |
||
369 | 378 | return $classMetaData; |
370 | 379 | } |
371 | 380 | |
381 | + /** |
|
382 | + * @param string $propertyPath |
|
383 | + */ |
|
372 | 384 | protected function resolveSubject($entity, $propertyPath) |
373 | 385 | { |
374 | 386 | if ('this' === $propertyPath) { |
@@ -423,6 +435,9 @@ discard block |
||
423 | 435 | return array_merge($defaultIncludes, $includes); |
424 | 436 | } |
425 | 437 | |
438 | + /** |
|
439 | + * @param string[] $attributes |
|
440 | + */ |
|
426 | 441 | protected function denyAccessUnlessGranted($attributes, $object = null, $message = 'Access Denied.') |
427 | 442 | { |
428 | 443 | if (!$this->getAuthorizationChecker()->isGranted($attributes, $object)) { |