Use PSR-12 code style

This commit is contained in:
James Cole
2022-10-30 14:23:00 +01:00
parent b27fe59ab4
commit 1667b88dcd
154 changed files with 277 additions and 322 deletions

View File

@@ -111,12 +111,13 @@ class AccountController extends Controller
// custom order.
$order = [AccountType::ASSET, AccountType::REVENUE, AccountType::EXPENSE];
usort(
$return, function ($a, $b) use ($order) {
$pos_a = array_search($a['type'], $order);
$pos_b = array_search($b['type'], $order);
$return,
function ($a, $b) use ($order) {
$pos_a = array_search($a['type'], $order, true);
$pos_b = array_search($b['type'], $order, true);
return $pos_a - $pos_b;
}
return $pos_a - $pos_b;
}
);
return response()->json($return);