fix(transformers): force object type for properties (#4544)
This commit is contained in:
parent
c3521e0221
commit
634c9353e3
1 changed files with 3 additions and 3 deletions
|
@ -47,10 +47,10 @@ class ActivityLogTransformer extends BaseClientTransformer
|
||||||
* Transforms any array values in the properties into a countable field for easier
|
* Transforms any array values in the properties into a countable field for easier
|
||||||
* use within the translation outputs.
|
* use within the translation outputs.
|
||||||
*/
|
*/
|
||||||
protected function properties(ActivityLog $model): array
|
protected function properties(ActivityLog $model): object
|
||||||
{
|
{
|
||||||
if (!$model->properties || $model->properties->isEmpty()) {
|
if (!$model->properties || $model->properties->isEmpty()) {
|
||||||
return [];
|
return (object) [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$properties = $model->properties
|
$properties = $model->properties
|
||||||
|
@ -76,7 +76,7 @@ class ActivityLogTransformer extends BaseClientTransformer
|
||||||
$properties = $properties->merge(['count' => $properties->get($keys[0])])->except($keys[0]);
|
$properties = $properties->merge(['count' => $properties->get($keys[0])])->except($keys[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $properties->toArray();
|
return (object) $properties->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue