|
@@ -195,10 +195,10 @@ discard block |
|
|
block discarded – undo |
|
195
|
195
|
{ |
|
196
|
196
|
$result = []; |
|
197
|
197
|
foreach (['id', 'type'] as $key) { |
|
198
|
|
- $getter = 'get' . ucfirst($key); |
|
|
198
|
+ $getter = 'get'.ucfirst($key); |
|
199
|
199
|
$value = $identifier->$getter(); |
|
200
|
200
|
if ($value === null || is_array($value) || (is_object($value) && !method_exists($value, '__toString'))) { |
|
201
|
|
- throw new InvalidValueException("The value {$key} of resource object " . get_class($identifier) . ' MUST be a string.'); |
|
|
201
|
+ throw new InvalidValueException("The value {$key} of resource object ".get_class($identifier).' MUST be a string.'); |
|
202
|
202
|
} |
|
203
|
203
|
if ($key === 'type' && $this->pluralize) { |
|
204
|
204
|
$value = Inflector::pluralize($value); |
|
@@ -250,7 +250,7 @@ discard block |
|
|
block discarded – undo |
|
250
|
250
|
} |
|
251
|
251
|
foreach ($relationship as $model) { |
|
252
|
252
|
if ($model instanceof ResourceInterface) { |
|
253
|
|
- $uniqueKey = $model->getType() . '/' . $model->getId(); |
|
|
253
|
+ $uniqueKey = $model->getType().'/'.$model->getId(); |
|
254
|
254
|
$data[$uniqueKey] = $this->serializeModel($model, $inclusion[$name]); |
|
255
|
255
|
if (!empty($inclusion[$name])) { |
|
256
|
256
|
$data = array_merge($data, $this->serializeIncluded($model, $inclusion[$name])); |
Please login to merge, or discard this patch.