mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-19 02:52:44 +00:00
Use PSR-12 code style
This commit is contained in:
@@ -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);
|
||||
|
@@ -78,5 +78,4 @@ class BillController extends Controller
|
||||
|
||||
return response()->json($filtered->toArray());
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -80,5 +80,4 @@ class ObjectGroupController extends Controller
|
||||
|
||||
return response()->json($return);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -113,7 +113,9 @@ class PiggyBankController extends Controller
|
||||
'id' => (string) $piggy->id,
|
||||
'name' => $piggy->name,
|
||||
'name_with_balance' => sprintf(
|
||||
'%s (%s / %s)', $piggy->name, app('amount')->formatAnything($currency, $currentAmount, false),
|
||||
'%s (%s / %s)',
|
||||
$piggy->name,
|
||||
app('amount')->formatAnything($currency, $currentAmount, false),
|
||||
app('amount')->formatAnything($currency, $piggy->targetamount, false),
|
||||
),
|
||||
'currency_id' => $currency->id,
|
||||
@@ -126,5 +128,4 @@ class PiggyBankController extends Controller
|
||||
|
||||
return response()->json($response);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -77,5 +77,4 @@ class RecurrenceController extends Controller
|
||||
|
||||
return response()->json($response);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -77,5 +77,4 @@ class RuleController extends Controller
|
||||
|
||||
return response()->json($response);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -101,7 +101,7 @@ class TransactionController extends Controller
|
||||
public function transactionsWithID(AutocompleteRequest $request): JsonResponse
|
||||
{
|
||||
$data = $request->getData();
|
||||
$result = new Collection;
|
||||
$result = new Collection();
|
||||
if (is_numeric($data['query'])) {
|
||||
// search for group, not journal.
|
||||
$firstResult = $this->groupRepository->find((int) $data['query']);
|
||||
|
Reference in New Issue
Block a user