Inline many variables.
This commit is contained in:
@@ -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');
|
||||
|
Reference in New Issue
Block a user