mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-16 22:58:09 +00:00
Clean up code.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user