Code cleanup and phpstan fixes. Still breaks but at least it's consistent.

This commit is contained in:
James Cole
2023-11-04 19:00:25 +01:00
parent fe0a205a05
commit 0f6f4e1a50
44 changed files with 80 additions and 154 deletions

View File

@@ -90,8 +90,8 @@ class AccountController extends Controller
$date = $this->parameters->get('date') ?? today(config('app.timezone'));
$result = $this->adminRepository->searchAccount((string)$query, $types, $data['limit']);
$defaultCurrency = app('amount')->getDefaultCurrency();
$allItems = [];
$groupedResult = [];
$allItems = [];
/** @var Account $account */
foreach ($result as $account) {
$nameWithBalance = $account->name;

View File

@@ -393,7 +393,7 @@ class BasicController extends Controller
*/
foreach ($spent as $currencyId => $row) {
app('log')->debug(sprintf('Processing spent array in currency #%d', $currencyId));
$currencyId = (int)$currencyId;
$currencyId = $currencyId;
$spent = '0';
$spentNative = '0';
// get the sum from the array of transactions (double loop but who cares)