@@ -127,8 +127,7 @@ |
||
127 | 127 | if ($this->parsedResources === null) { |
128 | 128 | foreach ($this->resources as $resourceOrIdentifier) { |
129 | 129 | $parsedResource = $resourceOrIdentifier instanceof SchemaIdentifierInterface ? |
130 | - $this->createParsedIdentifier($resourceOrIdentifier) : |
|
131 | - $this->createParsedResource($resourceOrIdentifier); |
|
130 | + $this->createParsedIdentifier($resourceOrIdentifier) : $this->createParsedResource($resourceOrIdentifier); |
|
132 | 131 | $this->parsedResources[] = $parsedResource; |
133 | 132 | |
134 | 133 | yield $parsedResource; |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | |
206 | 206 | \assert( |
207 | 207 | \call_user_func( |
208 | - function (array $paths): bool { |
|
208 | + function(array $paths): bool { |
|
209 | 209 | $pathsOk = true; |
210 | 210 | foreach ($paths as $path) { |
211 | 211 | $pathsOk = $pathsOk === true && \is_string($path) === true && empty($path) === false; |
@@ -301,8 +301,7 @@ discard block |
||
301 | 301 | public function withLinks(iterable $links): EncoderInterface |
302 | 302 | { |
303 | 303 | $this->links = $this->hasLinks() === false ? |
304 | - $links : |
|
305 | - $this->links = \array_merge( |
|
304 | + $links : $this->links = \array_merge( |
|
306 | 305 | $this->iterableToArray($this->getLinks()), |
307 | 306 | $this->iterableToArray($links) |
308 | 307 | ); |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | |
186 | 186 | $currentPath = $this->position->getPath(); |
187 | 187 | $nextLevel = $this->position->getLevel() + 1; |
188 | - $nextPathPrefix = empty($currentPath) === true ? '' : $currentPath . PositionInterface::PATH_SEPARATOR; |
|
188 | + $nextPathPrefix = empty($currentPath) === true ? '' : $currentPath.PositionInterface::PATH_SEPARATOR; |
|
189 | 189 | $this->getContext()->setPosition($this->getPosition()); |
190 | 190 | foreach ($this->schema->getRelationships($this->data, $this->getContext()) as $name => $description) { |
191 | 191 | \assert($this->assertRelationshipNameAndDescription($name, $description) === true); |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | |
210 | 210 | \assert( |
211 | 211 | $hasData || $hasMeta || $hasLinks, |
212 | - "Relationship `$name` for type `" . $this->getType() . |
|
212 | + "Relationship `$name` for type `".$this->getType(). |
|
213 | 213 | '` MUST contain at least one of the following: links, data or meta.' |
214 | 214 | ); |
215 | 215 | |
@@ -298,11 +298,11 @@ discard block |
||
298 | 298 | { |
299 | 299 | \assert( |
300 | 300 | \is_string($name) === true && empty($name) === false, |
301 | - "Relationship names for type `" . $this->getType() . '` should be non-empty strings.' |
|
301 | + "Relationship names for type `".$this->getType().'` should be non-empty strings.' |
|
302 | 302 | ); |
303 | 303 | \assert( |
304 | 304 | \is_array($description) === true && empty($description) === false, |
305 | - "Relationship `$name` for type `" . $this->getType() . '` should be a non-empty array.' |
|
305 | + "Relationship `$name` for type `".$this->getType().'` should be a non-empty array.' |
|
306 | 306 | ); |
307 | 307 | |
308 | 308 | return true; |