@@ -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; |
@@ -97,7 +97,7 @@ |
||
97 | 97 | public function getMediaType(): string |
98 | 98 | { |
99 | 99 | if ($this->mediaType === null) { |
100 | - $this->mediaType = $this->getType() . '/' . $this->getSubType(); |
|
100 | + $this->mediaType = $this->getType().'/'.$this->getSubType(); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | return $this->mediaType; |
@@ -168,7 +168,7 @@ |
||
168 | 168 | { |
169 | 169 | $resSubUrl = $this->getSchemaContainer()->getSchema($resource)->getSelfSubLink($resource)->getSubHref(); |
170 | 170 | $urlPrefix = $this->getUrlPrefix(); |
171 | - $location = $urlPrefix . $resSubUrl; |
|
171 | + $location = $urlPrefix.$resSubUrl; |
|
172 | 172 | |
173 | 173 | return $location; |
174 | 174 | } |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | foreach ($includePaths as $curPath) { |
111 | 111 | if ($pathLength === 0) { |
112 | 112 | $relationshipName = $this->getRelationshipNameForTopResource($curPath); |
113 | - } elseif (strpos($curPath, $pathBeginning . DocumentInterface::PATH_SEPARATOR) === 0) { |
|
113 | + } elseif (strpos($curPath, $pathBeginning.DocumentInterface::PATH_SEPARATOR) === 0) { |
|
114 | 114 | $relationshipName = $this->getRelationshipNameForResource($curPath, $pathLength); |
115 | 115 | } else { |
116 | 116 | $relationshipName = null; |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | |
167 | 167 | if ($path !== null) { |
168 | 168 | foreach ($paths as $targetPath) { |
169 | - if (strpos($targetPath, $path . DocumentInterface::PATH_SEPARATOR) === 0) { |
|
169 | + if (strpos($targetPath, $path.DocumentInterface::PATH_SEPARATOR) === 0) { |
|
170 | 170 | $hasMatch = true; |
171 | 171 | break; |
172 | 172 | } |
@@ -221,8 +221,7 @@ discard block |
||
221 | 221 | { |
222 | 222 | $nextSeparatorPos = strpos($curPath, DocumentInterface::PATH_SEPARATOR, $pathLength + 1); |
223 | 223 | $relationshipName = $nextSeparatorPos === false ? |
224 | - substr($curPath, $pathLength + 1) : |
|
225 | - substr($curPath, $pathLength + 1, $nextSeparatorPos - $pathLength - 1); |
|
224 | + substr($curPath, $pathLength + 1) : substr($curPath, $pathLength + 1, $nextSeparatorPos - $pathLength - 1); |
|
226 | 225 | |
227 | 226 | return $relationshipName; |
228 | 227 | } |
@@ -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 | { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * @param array $parameters |
54 | 54 | * @param string $errorTitle |
55 | 55 | * |
56 | - * @return iterable |
|
56 | + * @return \Generator |
|
57 | 57 | */ |
58 | 58 | protected function getFields(array $parameters, string $errorTitle): iterable |
59 | 59 | { |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | * @param array $parameters |
74 | 74 | * @param string $errorTitle |
75 | 75 | * |
76 | - * @return iterable |
|
76 | + * @return \Generator |
|
77 | 77 | */ |
78 | 78 | protected function getSorts(array $parameters, string $errorTitle): iterable |
79 | 79 | { |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | * @param string|mixed $shouldBeString |
107 | 107 | * @param string $errorTitle |
108 | 108 | * |
109 | - * @return iterable |
|
109 | + * @return \Generator |
|
110 | 110 | */ |
111 | 111 | private function splitCommaSeparatedStringAndCheckNoEmpties( |
112 | 112 | string $paramName, |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | * @param string $separator |
123 | 123 | * @param string $errorTitle |
124 | 124 | * |
125 | - * @return iterable |
|
125 | + * @return \Generator |
|
126 | 126 | */ |
127 | 127 | private function splitStringAndCheckNoEmpties( |
128 | 128 | string $paramName, |
@@ -35,7 +35,7 @@ |
||
35 | 35 | protected function getIncludes(array $parameters, string $errorTitle): iterable |
36 | 36 | { |
37 | 37 | if (array_key_exists(P::PARAM_INCLUDE, $parameters) === true) { |
38 | - $splitByDot = function (string $path) use ($errorTitle): iterable { |
|
38 | + $splitByDot = function(string $path) use ($errorTitle): iterable { |
|
39 | 39 | foreach ($this->splitStringAndCheckNoEmpties(P::PARAM_INCLUDE, $path, '.', $errorTitle) as $link) { |
40 | 40 | yield $link; |
41 | 41 | } |