mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Fix various phpmd issues.
This commit is contained in:
@@ -123,12 +123,12 @@ class AccountController extends Controller
|
||||
|
||||
usort(
|
||||
$allItems,
|
||||
static function (array $a, array $b): int {
|
||||
static function (array $left, array $right): int {
|
||||
$order = [AccountType::ASSET, AccountType::REVENUE, AccountType::EXPENSE];
|
||||
$pos_a = (int)array_search($a['type'], $order, true);
|
||||
$pos_b = (int)array_search($b['type'], $order, true);
|
||||
$posLeft = (int)array_search($left['type'], $order, true);
|
||||
$posRight = (int)array_search($right['type'], $order, true);
|
||||
|
||||
return $pos_a - $pos_b;
|
||||
return $posLeft - $posRight;
|
||||
}
|
||||
);
|
||||
return response()->json($allItems);
|
||||
|
@@ -84,6 +84,7 @@ class AccountController extends Controller
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
* @throws FireflyException
|
||||
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
|
||||
*/
|
||||
public function dashboard(DateRequest $request): JsonResponse
|
||||
{
|
||||
|
Reference in New Issue
Block a user