Clean up code.

This commit is contained in:
James Cole
2025-05-04 17:41:26 +02:00
parent e28e538272
commit 0573bf2402
147 changed files with 1758 additions and 1770 deletions

View File

@@ -121,6 +121,16 @@ class IndexController extends Controller
return view('accounts.index', compact('objectType', 'inactivePage', 'subTitleIcon', 'subTitle', 'page', 'accounts'));
}
private function subtract(array $startBalances, array $endBalances): array
{
$result = [];
foreach ($endBalances as $key => $value) {
$result[$key] = bcsub((string) $value, $startBalances[$key] ?? '0');
}
return $result;
}
/**
* Show list of accounts.
*
@@ -199,14 +209,4 @@ class IndexController extends Controller
return view('accounts.index', compact('objectType', 'inactiveCount', 'subTitleIcon', 'subTitle', 'page', 'accounts'));
}
private function subtract(array $startBalances, array $endBalances): array
{
$result = [];
foreach ($endBalances as $key => $value) {
$result[$key] = bcsub((string) $value, $startBalances[$key] ?? '0');
}
return $result;
}
}