@@ -221,6 +221,9 @@ discard block |
||
221 | 221 | return $this->getService()->update($entity); |
222 | 222 | } |
223 | 223 | |
224 | + /** |
|
225 | + * @param string|null $subresource |
|
226 | + */ |
|
224 | 227 | protected function listSubresource($entity, $subresource, $page = 1, $perPage = 50) |
225 | 228 | { |
226 | 229 | $propertyAccessor = $this->container->get('property_accessor'); |
@@ -238,6 +241,9 @@ discard block |
||
238 | 241 | return Inflector::tableize($this->getClassMetadata()->reflection->getShortName()); |
239 | 242 | } |
240 | 243 | |
244 | + /** |
|
245 | + * @return string |
|
246 | + */ |
|
241 | 247 | protected function getServiceId() |
242 | 248 | { |
243 | 249 | return $this->getCurrentRequest()->attributes->get('_service'); |
@@ -303,6 +309,9 @@ discard block |
||
303 | 309 | $this->assertRightGranted($entity, $right); |
304 | 310 | } |
305 | 311 | |
312 | + /** |
|
313 | + * @param string|null $subresource |
|
314 | + */ |
|
306 | 315 | protected function assertSubresourceListGranted($entity, $subresource) |
307 | 316 | { |
308 | 317 | $classMetadata = $this->getClassMetadata(); |
@@ -316,6 +325,9 @@ discard block |
||
316 | 325 | $this->assertRightGranted($entity, $right); |
317 | 326 | } |
318 | 327 | |
328 | + /** |
|
329 | + * @param string|null $subresource |
|
330 | + */ |
|
319 | 331 | protected function assertSubresourcePostGranted($entity, $subresource) |
320 | 332 | { |
321 | 333 | $classMetadata = $this->getClassMetadata(); |
@@ -341,6 +353,9 @@ discard block |
||
341 | 353 | return $classMetaData; |
342 | 354 | } |
343 | 355 | |
356 | + /** |
|
357 | + * @param string|null $subresource |
|
358 | + */ |
|
344 | 359 | protected function getSubResourceEntityClass($subresource) |
345 | 360 | { |
346 | 361 | /** @var PropertyMetadata $propertyMetadata */ |
@@ -349,6 +364,9 @@ discard block |
||
349 | 364 | return $propertyMetadata->getTargetClass(); |
350 | 365 | } |
351 | 366 | |
367 | + /** |
|
368 | + * @param string $propertyPath |
|
369 | + */ |
|
352 | 370 | protected function resolveSubject($entity, $propertyPath) |
353 | 371 | { |
354 | 372 | if ('this' === $propertyPath) { |
@@ -375,6 +393,7 @@ discard block |
||
375 | 393 | } |
376 | 394 | |
377 | 395 | /** |
396 | + * @param string|null $subresource |
|
378 | 397 | * @return string[] |
379 | 398 | */ |
380 | 399 | protected function getSubresourceSerializationGroups($subresource) |
@@ -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) { |
@@ -67,7 +67,7 @@ |
||
67 | 67 | $event->setResponse($response); |
68 | 68 | } |
69 | 69 | |
70 | - private function isInterceptionPath(?Request $request): bool |
|
70 | + private function isInterceptionPath(? Request $request) : bool |
|
71 | 71 | { |
72 | 72 | if (null === $request) { |
73 | 73 | return false; |
@@ -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) { |
@@ -95,7 +95,7 @@ |
||
95 | 95 | return null; |
96 | 96 | } |
97 | 97 | |
98 | - private function isIncluded($currentPath, array $paths, ?array $includes): bool |
|
98 | + private function isIncluded($currentPath, array $paths, ? array $includes) : bool |
|
99 | 99 | { |
100 | 100 | if (null === $includes) { |
101 | 101 | return false; |
@@ -164,6 +164,9 @@ |
||
164 | 164 | return false; |
165 | 165 | } |
166 | 166 | |
167 | + /** |
|
168 | + * @param string $type |
|
169 | + */ |
|
167 | 170 | private function convert( |
168 | 171 | $type, |
169 | 172 | $value |
@@ -11,7 +11,7 @@ |
||
11 | 11 | |
12 | 12 | public function createAccessTokenForUser(UserInterface $user): AccessToken; |
13 | 13 | |
14 | - public function findUserByToken(string $token): ?UserInterface; |
|
14 | + public function findUserByToken(string $token): ? UserInterface; |
|
15 | 15 | |
16 | 16 | public function cleanUpExpiredTokens(): int; |
17 | 17 |
@@ -63,7 +63,7 @@ |
||
63 | 63 | /** |
64 | 64 | * {@inheritdoc} |
65 | 65 | */ |
66 | - public function findUserByToken(string $token): ?UserInterface |
|
66 | + public function findUserByToken(string $token): ? UserInterface |
|
67 | 67 | { |
68 | 68 | return $this->accessTokenRepository->findUserByToken($token); |
69 | 69 | } |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | /** |
220 | 220 | * @return null|\string[] |
221 | 221 | */ |
222 | - public function getIncludablePaths(): ?array |
|
222 | + public function getIncludablePaths(): ? array |
|
223 | 223 | { |
224 | 224 | return $this->includablePaths; |
225 | 225 | } |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | /** |
228 | 228 | * @param null|\string[] $includablePaths |
229 | 229 | */ |
230 | - public function setIncludablePaths(?array $includablePaths) |
|
230 | + public function setIncludablePaths(? array $includablePaths) |
|
231 | 231 | { |
232 | 232 | $this->includablePaths = $includablePaths; |
233 | 233 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | public function findUserByToken($token) |
15 | 15 | { |
16 | 16 | return $this->getEntityManager()->transactional( |
17 | - function () use ($token) { |
|
17 | + function() use ($token) { |
|
18 | 18 | /** @var AccessToken $accessToken */ |
19 | 19 | $accessToken = $this->createFindUserByTokenQuery($token)->getOneOrNullResult(); |
20 | 20 | if (null === $accessToken) { |