mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 14:12:15 +00:00
Various code cleanup.
This commit is contained in:
@@ -123,7 +123,7 @@ trait AugumentData
|
||||
foreach ($accountIds as $combinedId) {
|
||||
$parts = explode('-', $combinedId);
|
||||
$accountId = (int)$parts[0];
|
||||
if (isset($grouped[$accountId])) {
|
||||
if (array_key_exists($accountId, $grouped)) {
|
||||
$return[$accountId] = $grouped[$accountId][0]['name'];
|
||||
}
|
||||
}
|
||||
@@ -147,7 +147,7 @@ trait AugumentData
|
||||
$grouped = $budgets->groupBy('id')->toArray();
|
||||
$return = [];
|
||||
foreach ($budgetIds as $budgetId) {
|
||||
if (isset($grouped[$budgetId])) {
|
||||
if (array_key_exists($budgetId, $grouped)) {
|
||||
$return[$budgetId] = $grouped[$budgetId][0]['name'];
|
||||
}
|
||||
}
|
||||
@@ -173,7 +173,7 @@ trait AugumentData
|
||||
foreach ($categoryIds as $combinedId) {
|
||||
$parts = explode('-', $combinedId);
|
||||
$categoryId = (int)$parts[0];
|
||||
if (isset($grouped[$categoryId])) {
|
||||
if (array_key_exists($categoryId, $grouped)) {
|
||||
$return[$categoryId] = $grouped[$categoryId][0]['name'];
|
||||
}
|
||||
}
|
||||
@@ -286,7 +286,7 @@ trait AugumentData
|
||||
$currencyId = (int)$journal['currency_id'];
|
||||
|
||||
// if not set, set to zero:
|
||||
if (!isset($sum['per_currency'][$currencyId])) {
|
||||
if (!array_key_exists($currencyId, $sum['per_currency'])) {
|
||||
$sum['per_currency'][$currencyId] = [
|
||||
'sum' => '0',
|
||||
'currency' => [
|
||||
|
||||
Reference in New Issue
Block a user