@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | */ |
107 | 107 | protected function getProperty(JsonApiResource $entity, $property) |
108 | 108 | { |
109 | - $getter = 'get' . ucfirst($property); |
|
109 | + $getter = 'get'.ucfirst($property); |
|
110 | 110 | |
111 | 111 | if (!method_exists($entity, $getter)) { |
112 | 112 | throw RestException::missingGetter($entity, $property, $getter); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | */ |
126 | 126 | protected function setProperty(JsonApiResource $entity, $property, $value) |
127 | 127 | { |
128 | - $setter = 'set' . ucfirst($property); |
|
128 | + $setter = 'set'.ucfirst($property); |
|
129 | 129 | |
130 | 130 | if (!method_exists($entity, $setter)) { |
131 | 131 | throw RestException::missingSetter($entity, $property, $setter); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | */ |
145 | 145 | protected function addRelationItem(JsonApiResource $entity, $field, $item) |
146 | 146 | { |
147 | - $adder = 'add' . ucfirst($field); |
|
147 | + $adder = 'add'.ucfirst($field); |
|
148 | 148 | |
149 | 149 | if (!method_exists($entity, $adder)) { |
150 | 150 | throw RestException::missingAdder($entity, $field, $adder); |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | */ |
164 | 164 | protected function removeRelationItem(JsonApiResource $entity, $field, $item) |
165 | 165 | { |
166 | - $remover = 'remove' . ucfirst($field); |
|
166 | + $remover = 'remove'.ucfirst($field); |
|
167 | 167 | |
168 | 168 | if (!method_exists($entity, $remover)) { |
169 | 169 | throw RestException::missingRemover($entity, $field, $remover); |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -$loader = require __DIR__ . '/vendor/autoload.php'; |
|
2 | +$loader = require __DIR__.'/vendor/autoload.php'; |
|
3 | 3 | |
4 | 4 | return [ |
5 | 5 | 'migrations_namespace' => 'Pz\Doctrine\Rest\Tests\Migrations', |
@@ -32,7 +32,7 @@ |
||
32 | 32 | * |
33 | 33 | * @return array |
34 | 34 | */ |
35 | - protected function serializeResource(Serializer $serializer, $data): array|null |
|
35 | + protected function serializeResource(Serializer $serializer, $data): array | null |
|
36 | 36 | { |
37 | 37 | $includeAttributes = true; |
38 | 38 | $resourceKey = $this->resource->getResourceKey(); |
@@ -74,7 +74,7 @@ |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | if ($this->isCollection($data)) { |
77 | - $data['data'] = array_map(function ($resource) use ($availableIncludes) { |
|
77 | + $data['data'] = array_map(function($resource) use ($availableIncludes) { |
|
78 | 78 | foreach ($availableIncludes as $relationshipKey) { |
79 | 79 | $resource = $this->addRelationshipLinks($resource, $relationshipKey); |
80 | 80 | } |