@@ -87,7 +87,7 @@ |
||
| 87 | 87 | */ |
| 88 | 88 | public static function getCompare(): Closure |
| 89 | 89 | { |
| 90 | - return function (AcceptMediaTypeInterface $lhs, AcceptMediaTypeInterface $rhs) { |
|
| 90 | + return function(AcceptMediaTypeInterface $lhs, AcceptMediaTypeInterface $rhs) { |
|
| 91 | 91 | $qualityCompare = self::compareQuality($lhs->getQuality(), $rhs->getQuality()); |
| 92 | 92 | if ($qualityCompare !== 0) { |
| 93 | 93 | return $qualityCompare; |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | private $httpCode; |
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | - * @param ErrorInterface|iterable $errors |
|
| 57 | + * @param ErrorInterface $errors |
|
| 58 | 58 | * @param int $httpCode |
| 59 | 59 | * @param Exception|null $previous |
| 60 | 60 | * |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | * @param array $parameters |
| 31 | 31 | * @param string $errorTitle |
| 32 | 32 | * |
| 33 | - * @return iterable |
|
| 33 | + * @return \Generator |
|
| 34 | 34 | */ |
| 35 | 35 | protected function getIncludes(array $parameters, string $errorTitle): iterable |
| 36 | 36 | { |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | * @param array $parameters |
| 48 | 48 | * @param string $errorTitle |
| 49 | 49 | * |
| 50 | - * @return iterable |
|
| 50 | + * @return \Generator |
|
| 51 | 51 | */ |
| 52 | 52 | protected function getFields(array $parameters, string $errorTitle): iterable |
| 53 | 53 | { |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | * @param array $parameters |
| 68 | 68 | * @param string $errorTitle |
| 69 | 69 | * |
| 70 | - * @return iterable |
|
| 70 | + * @return \Generator |
|
| 71 | 71 | */ |
| 72 | 72 | protected function getSorts(array $parameters, string $errorTitle): iterable |
| 73 | 73 | { |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | * @param array $parameters |
| 100 | 100 | * @param string $errorTitle |
| 101 | 101 | * |
| 102 | - * @return iterable |
|
| 102 | + * @return \Generator |
|
| 103 | 103 | */ |
| 104 | 104 | protected function getProfileUrls(array $parameters, string $errorTitle): iterable |
| 105 | 105 | { |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | * @param string|mixed $shouldBeString |
| 120 | 120 | * @param string $errorTitle |
| 121 | 121 | * |
| 122 | - * @return iterable |
|
| 122 | + * @return \Generator |
|
| 123 | 123 | */ |
| 124 | 124 | private function splitCommaSeparatedStringAndCheckNoEmpties( |
| 125 | 125 | string $paramName, |
@@ -131,10 +131,10 @@ discard block |
||
| 131 | 131 | |
| 132 | 132 | /** |
| 133 | 133 | * @param string $paramName |
| 134 | - * @param string|mixed $shouldBeString |
|
| 134 | + * @param string $shouldBeString |
|
| 135 | 135 | * @param string $errorTitle |
| 136 | 136 | * |
| 137 | - * @return iterable |
|
| 137 | + * @return \Generator |
|
| 138 | 138 | */ |
| 139 | 139 | private function splitSpaceSeparatedStringAndCheckNoEmpties( |
| 140 | 140 | string $paramName, |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | * @param string $separator |
| 151 | 151 | * @param string $errorTitle |
| 152 | 152 | * |
| 153 | - * @return iterable |
|
| 153 | + * @return \Generator |
|
| 154 | 154 | */ |
| 155 | 155 | private function splitStringAndCheckNoEmpties( |
| 156 | 156 | string $paramName, |
@@ -117,7 +117,7 @@ |
||
| 117 | 117 | * @param string $type |
| 118 | 118 | * @param iterable $fields |
| 119 | 119 | * |
| 120 | - * @return iterable |
|
| 120 | + * @return \Generator |
|
| 121 | 121 | */ |
| 122 | 122 | protected function filterFields(string $type, iterable $fields): iterable |
| 123 | 123 | { |
@@ -566,7 +566,7 @@ discard block |
||
| 566 | 566 | */ |
| 567 | 567 | protected function getPathToData(): string |
| 568 | 568 | { |
| 569 | - return '/' . DocumentInterface::KEYWORD_DATA; |
|
| 569 | + return '/'.DocumentInterface::KEYWORD_DATA; |
|
| 570 | 570 | } |
| 571 | 571 | |
| 572 | 572 | /** |
@@ -574,7 +574,7 @@ discard block |
||
| 574 | 574 | */ |
| 575 | 575 | protected function getPathToType(): string |
| 576 | 576 | { |
| 577 | - return $this->getPathToData() . '/' . DocumentInterface::KEYWORD_TYPE; |
|
| 577 | + return $this->getPathToData().'/'.DocumentInterface::KEYWORD_TYPE; |
|
| 578 | 578 | } |
| 579 | 579 | |
| 580 | 580 | /** |
@@ -582,7 +582,7 @@ discard block |
||
| 582 | 582 | */ |
| 583 | 583 | protected function getPathToId(): string |
| 584 | 584 | { |
| 585 | - return $this->getPathToData() . '/' . DocumentInterface::KEYWORD_ID; |
|
| 585 | + return $this->getPathToData().'/'.DocumentInterface::KEYWORD_ID; |
|
| 586 | 586 | } |
| 587 | 587 | |
| 588 | 588 | /** |
@@ -590,7 +590,7 @@ discard block |
||
| 590 | 590 | */ |
| 591 | 591 | protected function getPathToAttributes(): string |
| 592 | 592 | { |
| 593 | - return $this->getPathToData() . '/' . DocumentInterface::KEYWORD_ATTRIBUTES; |
|
| 593 | + return $this->getPathToData().'/'.DocumentInterface::KEYWORD_ATTRIBUTES; |
|
| 594 | 594 | } |
| 595 | 595 | |
| 596 | 596 | /** |
@@ -600,7 +600,7 @@ discard block |
||
| 600 | 600 | */ |
| 601 | 601 | protected function getPathToAttribute(string $name): string |
| 602 | 602 | { |
| 603 | - return $this->getPathToData() . '/' . DocumentInterface::KEYWORD_ATTRIBUTES . '/' . $name; |
|
| 603 | + return $this->getPathToData().'/'.DocumentInterface::KEYWORD_ATTRIBUTES.'/'.$name; |
|
| 604 | 604 | } |
| 605 | 605 | |
| 606 | 606 | /** |
@@ -608,7 +608,7 @@ discard block |
||
| 608 | 608 | */ |
| 609 | 609 | protected function getPathToRelationships(): string |
| 610 | 610 | { |
| 611 | - return $this->getPathToData() . '/' . DocumentInterface::KEYWORD_RELATIONSHIPS; |
|
| 611 | + return $this->getPathToData().'/'.DocumentInterface::KEYWORD_RELATIONSHIPS; |
|
| 612 | 612 | } |
| 613 | 613 | |
| 614 | 614 | /** |
@@ -618,7 +618,7 @@ discard block |
||
| 618 | 618 | */ |
| 619 | 619 | protected function getPathToRelationship(string $name): string |
| 620 | 620 | { |
| 621 | - return $this->getPathToRelationships() . '/' . $name; |
|
| 621 | + return $this->getPathToRelationships().'/'.$name; |
|
| 622 | 622 | } |
| 623 | 623 | |
| 624 | 624 | /** |
@@ -628,8 +628,8 @@ discard block |
||
| 628 | 628 | */ |
| 629 | 629 | protected function getPathToRelationshipType(string $name): string |
| 630 | 630 | { |
| 631 | - return $this->getPathToRelationship($name) . '/' . |
|
| 632 | - DocumentInterface::KEYWORD_DATA . '/' . DocumentInterface::KEYWORD_TYPE; |
|
| 631 | + return $this->getPathToRelationship($name).'/'. |
|
| 632 | + DocumentInterface::KEYWORD_DATA.'/'.DocumentInterface::KEYWORD_TYPE; |
|
| 633 | 633 | } |
| 634 | 634 | |
| 635 | 635 | /** |
@@ -639,7 +639,7 @@ discard block |
||
| 639 | 639 | */ |
| 640 | 640 | protected function getPathToRelationshipId(string $name): string |
| 641 | 641 | { |
| 642 | - return $this->getPathToRelationship($name) . '/' . |
|
| 643 | - DocumentInterface::KEYWORD_DATA . '/' . DocumentInterface::KEYWORD_ID; |
|
| 642 | + return $this->getPathToRelationship($name).'/'. |
|
| 643 | + DocumentInterface::KEYWORD_DATA.'/'.DocumentInterface::KEYWORD_ID; |
|
| 644 | 644 | } |
| 645 | 645 | } |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | * @param bool $addSelfLink |
| 85 | 85 | * @param bool $addRelatedLink |
| 86 | 86 | * |
| 87 | - * @return iterable |
|
| 87 | + * @return \Generator |
|
| 88 | 88 | */ |
| 89 | 89 | private function parseLinks( |
| 90 | 90 | SchemaInterface $parentSchema, |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | |
| 69 | 69 | $nextPosition = $factory->createPosition( |
| 70 | 70 | $nextLevel, |
| 71 | - $nextPathPrefix . $name, |
|
| 71 | + $nextPathPrefix.$name, |
|
| 72 | 72 | $parentType, |
| 73 | 73 | $name |
| 74 | 74 | ); |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | * @see ResourceInterface |
| 189 | 189 | * @see IdentifierInterface |
| 190 | 190 | * |
| 191 | - * @return iterable |
|
| 191 | + * @return \Generator |
|
| 192 | 192 | */ |
| 193 | 193 | private function parseAsResourcesOrIdentifiers( |
| 194 | 194 | PositionInterface $position, |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | * |
| 213 | 213 | * @see ResourceInterface |
| 214 | 214 | * |
| 215 | - * @return iterable |
|
| 215 | + * @return \Generator |
|
| 216 | 216 | * |
| 217 | 217 | */ |
| 218 | 218 | private function parseAsResource( |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | /** |
| 234 | 234 | * @param ResourceInterface $resource |
| 235 | 235 | * |
| 236 | - * @return iterable |
|
| 236 | + * @return \Generator |
|
| 237 | 237 | * |
| 238 | 238 | * @SuppressWarnings(PHPMD.CyclomaticComplexity) |
| 239 | 239 | */ |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | /** @var string */ |
| 51 | 51 | public const MSG_CAN_NOT_PARSE_RELATIONSHIP = |
| 52 | - 'For resource of type `%s` with ID `%s` relationship `%s` cannot be parsed because it either ' . |
|
| 52 | + 'For resource of type `%s` with ID `%s` relationship `%s` cannot be parsed because it either '. |
|
| 53 | 53 | 'has `null` or identifier as data. Skipping.'; |
| 54 | 54 | |
| 55 | 55 | /** @var string */ |
@@ -446,7 +446,7 @@ discard block |
||
| 446 | 446 | foreach ($paths as $path) { |
| 447 | 447 | $curPath = ''; |
| 448 | 448 | foreach (\explode($separator, $path) as $pathPart) { |
| 449 | - $curPath = empty($curPath) === true ? $pathPart : $curPath . $separator . $pathPart; |
|
| 449 | + $curPath = empty($curPath) === true ? $pathPart : $curPath.$separator.$pathPart; |
|
| 450 | 450 | $normalizedPaths[$curPath] = true; |
| 451 | 451 | } |
| 452 | 452 | } |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | { |
| 71 | 71 | \assert( |
| 72 | 72 | $this->schemaContainer->hasSchema($resource), |
| 73 | - 'No Schema found for resource `' . \get_class($resource) . '`.' |
|
| 73 | + 'No Schema found for resource `'.\get_class($resource).'`.' |
|
| 74 | 74 | ); |
| 75 | 75 | |
| 76 | 76 | return $this->factory->createParsedResource( |