@@ -67,7 +67,7 @@ |
||
| 67 | 67 | protected function mapRelationshipsArray(array $data) |
| 68 | 68 | { |
| 69 | 69 | return array_map( |
| 70 | - function ($relation) { |
|
| 70 | + function($relation) { |
|
| 71 | 71 | return $this->getResourceId($relation) ?: ['attributes' => $relation]; |
| 72 | 72 | }, |
| 73 | 73 | $data |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | if ($this->rootAlias === null) { |
| 30 | 30 | $reflectionClass = $this->getClassMetadata()->getReflectionClass(); |
| 31 | 31 | if ($reflectionClass->implementsInterface(JsonApiResource::class)) { |
| 32 | - $this->rootAlias = call_user_func($reflectionClass->getName(). '::getResourceKey'); |
|
| 32 | + $this->rootAlias = call_user_func($reflectionClass->getName().'::getResourceKey'); |
|
| 33 | 33 | } else { |
| 34 | 34 | // Camel case to underscore-case |
| 35 | 35 | $this->rootAlias = strtolower(preg_replace('/(?<!^)[A-Z]/', '_$0', $reflectionClass->getShortName())); |
@@ -76,7 +76,9 @@ |
||
| 76 | 76 | $orderBy = []; |
| 77 | 77 | |
| 78 | 78 | foreach ($fields as $field) { |
| 79 | - if (empty($field)) continue; |
|
| 79 | + if (empty($field)) { |
|
| 80 | + continue; |
|
| 81 | + } |
|
| 80 | 82 | |
| 81 | 83 | $direction = 'ASC'; |
| 82 | 84 | if ($field[0] === '-') { |