Reformat various code.

This commit is contained in:
James Cole
2022-03-29 15:00:29 +02:00
parent d1a09ff33b
commit d04efb8325
81 changed files with 662 additions and 662 deletions

View File

@@ -123,7 +123,7 @@ trait AugumentData
$return = [];
foreach ($accountIds as $combinedId) {
$parts = explode('-', $combinedId);
$accountId = (int)$parts[0];
$accountId = (int) $parts[0];
if (array_key_exists($accountId, $grouped)) {
$return[$accountId] = $grouped[$accountId][0]['name'];
}
@@ -152,7 +152,7 @@ trait AugumentData
$return[$budgetId] = $grouped[$budgetId][0]['name'];
}
}
$return[0] = (string)trans('firefly.no_budget');
$return[0] = (string) trans('firefly.no_budget');
return $return;
}
@@ -173,12 +173,12 @@ trait AugumentData
$return = [];
foreach ($categoryIds as $combinedId) {
$parts = explode('-', $combinedId);
$categoryId = (int)$parts[0];
$categoryId = (int) $parts[0];
if (array_key_exists($categoryId, $grouped)) {
$return[$categoryId] = $grouped[$categoryId][0]['name'];
}
}
$return[0] = (string)trans('firefly.no_category');
$return[0] = (string) trans('firefly.no_category');
return $return;
}
@@ -222,7 +222,7 @@ trait AugumentData
$currentStart = clone $entry->start_date;
$currentEnd = clone $entry->end_date;
$expenses = $opsRepository->sumExpenses($currentStart, $currentEnd, null, $budgetCollection, $currency);
$spent = $expenses[(int)$currency->id]['sum'] ?? '0';
$spent = $expenses[(int) $currency->id]['sum'] ?? '0';
$entry->spent = $spent;
$limits->push($entry);
@@ -285,7 +285,7 @@ trait AugumentData
];
// loop to support multi currency
foreach ($journals as $journal) {
$currencyId = (int)$journal['currency_id'];
$currencyId = (int) $journal['currency_id'];
// if not set, set to zero:
if (!array_key_exists($currencyId, $sum['per_currency'])) {