mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-02 11:04:53 +00:00
Refactor various code.
This commit is contained in:
@@ -118,10 +118,10 @@ class AccountController extends Controller
|
||||
// custom order.
|
||||
usort(
|
||||
$return,
|
||||
static function ($a, $b) {
|
||||
static function (array $left, array $right) {
|
||||
$order = [AccountType::ASSET, AccountType::REVENUE, AccountType::EXPENSE];
|
||||
$posA = array_search($a['type'], $order, true);
|
||||
$posB = array_search($b['type'], $order, true);
|
||||
$posA = array_search($left['type'], $order, true);
|
||||
$posB = array_search($right['type'], $order, true);
|
||||
|
||||
return $posA - $posB;
|
||||
}
|
||||
|
Reference in New Issue
Block a user