@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | |
171 | 171 | $currentPath = $this->getPosition()->getPath(); |
172 | 172 | $nextLevel = $this->getPosition()->getLevel() + 1; |
173 | - $nextPathPrefix = empty($currentPath) === true ? '' : $currentPath . PositionInterface::PATH_SEPARATOR; |
|
173 | + $nextPathPrefix = empty($currentPath) === true ? '' : $currentPath.PositionInterface::PATH_SEPARATOR; |
|
174 | 174 | foreach ($this->getSchema()->getRelationships($this->getData()) as $name => $description) { |
175 | 175 | \assert($this->assertRelationshipNameAndDescription($name, $description) === true); |
176 | 176 | |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | |
193 | 193 | \assert( |
194 | 194 | $hasData || $hasMeta || $hasLinks, |
195 | - "Relationship `$name` for type `" . $this->getType() . |
|
195 | + "Relationship `$name` for type `".$this->getType(). |
|
196 | 196 | '` MUST contain at least one of the following: links, data or meta.' |
197 | 197 | ); |
198 | 198 | |
@@ -367,11 +367,11 @@ discard block |
||
367 | 367 | { |
368 | 368 | \assert( |
369 | 369 | \is_string($name) === true && empty($name) === false, |
370 | - "Relationship names for type `" . $this->getType() . '` should be non-empty strings.' |
|
370 | + "Relationship names for type `".$this->getType().'` should be non-empty strings.' |
|
371 | 371 | ); |
372 | 372 | \assert( |
373 | 373 | \is_array($description) === true && empty($description) === false, |
374 | - "Relationship `$name` for type `" . $this->getType() . '` should be a non-empty array.' |
|
374 | + "Relationship `$name` for type `".$this->getType().'` should be a non-empty array.' |
|
375 | 375 | ); |
376 | 376 | |
377 | 377 | return true; |
@@ -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 | /** |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | foreach ($paths as $path) { |
500 | 500 | $curPath = ''; |
501 | 501 | foreach (\explode($separator, $path) as $pathPart) { |
502 | - $curPath = empty($curPath) === true ? $pathPart : $curPath . $separator . $pathPart; |
|
502 | + $curPath = empty($curPath) === true ? $pathPart : $curPath.$separator.$pathPart; |
|
503 | 503 | $normalizedPaths[$curPath] = true; |
504 | 504 | } |
505 | 505 | } |
@@ -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( |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | { |
204 | 204 | \assert( |
205 | 205 | \call_user_func( |
206 | - function (array $paths): bool { |
|
206 | + function(array $paths): bool { |
|
207 | 207 | $pathsOk = true; |
208 | 208 | foreach ($paths as $path) { |
209 | 209 | $pathsOk = $pathsOk === true && \is_string($path) === true && empty($path) === false; |
@@ -299,8 +299,7 @@ discard block |
||
299 | 299 | public function withLinks(iterable $links): EncoderInterface |
300 | 300 | { |
301 | 301 | $this->links = $this->hasLinks() === false ? |
302 | - $links : |
|
303 | - $this->links = \array_merge( |
|
302 | + $links : $this->links = \array_merge( |
|
304 | 303 | $this->iterableToArray($this->getLinks()), |
305 | 304 | $this->iterableToArray($links) |
306 | 305 | ); |