Inline many variables.

This commit is contained in:
Lucas Michot
2024-10-31 18:20:11 +01:00
parent aa7fa16c74
commit 1ec224fde1
20 changed files with 34 additions and 79 deletions

View File

@@ -21,7 +21,7 @@ function invalidTokenResponse()
function serializeApiResponse($data)
{
if ($data instanceof Collection) {
$data = $data->map(function ($d) {
return $data->map(function ($d) {
$d = collect($d)->sortKeys();
$created_at = data_get($d, 'created_at');
$updated_at = data_get($d, 'updated_at');
@@ -49,8 +49,6 @@ function serializeApiResponse($data)
return $d;
});
return $data;
} else {
$d = collect($data)->sortKeys();
$created_at = data_get($d, 'created_at');