@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | } |
234 | 234 | |
235 | 235 | /** |
236 | - * @param iterable $attributes |
|
236 | + * @param \Generator $attributes |
|
237 | 237 | * |
238 | 238 | * @return self |
239 | 239 | * |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | } |
256 | 256 | |
257 | 257 | /** |
258 | - * @param iterable $attributes |
|
258 | + * @param \Generator $attributes |
|
259 | 259 | * |
260 | 260 | * @return self |
261 | 261 | * |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | * @param string $modelClass |
279 | 279 | * @param iterable $attributes |
280 | 280 | * |
281 | - * @return iterable |
|
281 | + * @return \Generator |
|
282 | 282 | * |
283 | 283 | * @SuppressWarnings(PHPMD.StaticAccess) |
284 | 284 | * |
@@ -413,7 +413,7 @@ discard block |
||
413 | 413 | } |
414 | 414 | |
415 | 415 | /** |
416 | - * @param iterable $filters |
|
416 | + * @param \Limoncello\Flute\Api\iterable|null $filters |
|
417 | 417 | * |
418 | 418 | * @return self |
419 | 419 | * |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | } |
430 | 430 | |
431 | 431 | /** |
432 | - * @param iterable $filters |
|
432 | + * @param \Limoncello\Flute\Api\iterable|null $filters |
|
433 | 433 | * |
434 | 434 | * @return self |
435 | 435 | * |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | } |
446 | 446 | |
447 | 447 | /** |
448 | - * @param iterable $filters |
|
448 | + * @param \Limoncello\Flute\Api\iterable|null $filters |
|
449 | 449 | * |
450 | 450 | * @return self |
451 | 451 | * |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare (strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Limoncello\Flute\Validation\JsonApi; |
4 | 4 | |
@@ -714,7 +714,7 @@ discard block |
||
714 | 714 | { |
715 | 715 | // no validation rule means we should accept any input value |
716 | 716 | if ($ruleIndexes === null) { |
717 | - return is_numeric($value) === true ? (int)$value : 0; |
|
717 | + return is_numeric($value) === true ? (int) $value : 0; |
|
718 | 718 | } |
719 | 719 | |
720 | 720 | $ruleIndex = $this->serializerClass::readRuleMainIndex($ruleIndexes); |
@@ -725,7 +725,7 @@ discard block |
||
725 | 725 | |
726 | 726 | $validatedValue = $this->readSingleCapturedValue(); |
727 | 727 | |
728 | - return (int)$validatedValue; |
|
728 | + return (int) $validatedValue; |
|
729 | 729 | } |
730 | 730 | |
731 | 731 | /** |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare (strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | namespace Limoncello\Flute\Schema; |
4 | 4 | |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | if ($belongsToFkName !== null && $this->hasProperty($model, $belongsToFkName) === true) { |
167 | 167 | $reverseIndex = $this->getProperty($model, $belongsToFkName); |
168 | 168 | $identifier = $reverseIndex === null ? |
169 | - null : new Identifier((string)$reverseIndex, $reverseType, false, null); |
|
169 | + null : new Identifier((string) $reverseIndex, $reverseType, false, null); |
|
170 | 170 | |
171 | 171 | yield $jsonRelName => [ |
172 | 172 | static::RELATIONSHIP_DATA => $identifier, |
@@ -241,14 +241,14 @@ discard block |
||
241 | 241 | // if we are here then relationship contains paginated data, so we have to add pagination links |
242 | 242 | $offset = $relationshipData->getOffset(); |
243 | 243 | $limit = $relationshipData->getLimit(); |
244 | - $urlPrefix = $this->getRelationshipSelfSubUrl($model, $jsonRelName) . '?'; |
|
245 | - $buildLink = function (int $offset, int $limit) use ($urlPrefix) : LinkInterface { |
|
244 | + $urlPrefix = $this->getRelationshipSelfSubUrl($model, $jsonRelName).'?'; |
|
245 | + $buildLink = function(int $offset, int $limit) use ($urlPrefix) : LinkInterface { |
|
246 | 246 | $paramsWithPaging = [ |
247 | 247 | JsonApiQueryParserInterface::PARAM_PAGING_OFFSET => $offset, |
248 | 248 | JsonApiQueryParserInterface::PARAM_PAGING_LIMIT => $limit, |
249 | 249 | ]; |
250 | 250 | |
251 | - $subUrl = $urlPrefix . http_build_query($paramsWithPaging); |
|
251 | + $subUrl = $urlPrefix.http_build_query($paramsWithPaging); |
|
252 | 252 | |
253 | 253 | return $this->getFactory()->createLink(true, $subUrl, false); |
254 | 254 | }; |
@@ -360,6 +360,6 @@ discard block |
||
360 | 360 | */ |
361 | 361 | private function getRelationshipSelfSubUrl(ModelInterface $model, string $jsonRelName): string |
362 | 362 | { |
363 | - return $this->getSelfSubUrl($model) . '/' . DocumentInterface::KEYWORD_RELATIONSHIPS . '/' . $jsonRelName; |
|
363 | + return $this->getSelfSubUrl($model).'/'.DocumentInterface::KEYWORD_RELATIONSHIPS.'/'.$jsonRelName; |
|
364 | 364 | } |
365 | 365 | } |