mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-10 12:24:50 +00:00
Clean up code.
This commit is contained in:
@@ -62,7 +62,7 @@ class NoCategoryRepository implements NoCategoryRepositoryInterface
|
||||
|
||||
foreach ($journals as $journal) {
|
||||
$currencyId = (int)$journal['currency_id'];
|
||||
$array[$currencyId] = $array[$currencyId] ?? [
|
||||
$array[$currencyId] ??= [
|
||||
'categories' => [],
|
||||
'currency_id' => $currencyId,
|
||||
'currency_name' => $journal['currency_name'],
|
||||
@@ -71,7 +71,7 @@ class NoCategoryRepository implements NoCategoryRepositoryInterface
|
||||
'currency_decimal_places' => $journal['currency_decimal_places'],
|
||||
];
|
||||
// info about the non-existent category:
|
||||
$array[$currencyId]['categories'][0] = $array[$currencyId]['categories'][0] ?? [
|
||||
$array[$currencyId]['categories'][0] ??= [
|
||||
'id' => 0,
|
||||
'name' => (string)trans('firefly.noCategory'),
|
||||
'transaction_journals' => [],
|
||||
@@ -124,7 +124,7 @@ class NoCategoryRepository implements NoCategoryRepositoryInterface
|
||||
|
||||
foreach ($journals as $journal) {
|
||||
$currencyId = (int)$journal['currency_id'];
|
||||
$array[$currencyId] = $array[$currencyId] ?? [
|
||||
$array[$currencyId] ??= [
|
||||
'categories' => [],
|
||||
'currency_id' => $currencyId,
|
||||
'currency_name' => $journal['currency_name'],
|
||||
@@ -134,7 +134,7 @@ class NoCategoryRepository implements NoCategoryRepositoryInterface
|
||||
];
|
||||
|
||||
// info about the non-existent category:
|
||||
$array[$currencyId]['categories'][0] = $array[$currencyId]['categories'][0] ?? [
|
||||
$array[$currencyId]['categories'][0] ??= [
|
||||
'id' => 0,
|
||||
'name' => (string)trans('firefly.noCategory'),
|
||||
'transaction_journals' => [],
|
||||
@@ -175,7 +175,7 @@ class NoCategoryRepository implements NoCategoryRepositoryInterface
|
||||
|
||||
foreach ($journals as $journal) {
|
||||
$currencyId = (int)$journal['currency_id'];
|
||||
$array[$currencyId] = $array[$currencyId] ?? [
|
||||
$array[$currencyId] ??= [
|
||||
'sum' => '0',
|
||||
'currency_id' => $currencyId,
|
||||
'currency_name' => $journal['currency_name'],
|
||||
@@ -212,7 +212,7 @@ class NoCategoryRepository implements NoCategoryRepositoryInterface
|
||||
|
||||
foreach ($journals as $journal) {
|
||||
$currencyId = (int)$journal['currency_id'];
|
||||
$array[$currencyId] = $array[$currencyId] ?? [
|
||||
$array[$currencyId] ??= [
|
||||
'sum' => '0',
|
||||
'currency_id' => $currencyId,
|
||||
'currency_name' => $journal['currency_name'],
|
||||
@@ -243,7 +243,7 @@ class NoCategoryRepository implements NoCategoryRepositoryInterface
|
||||
|
||||
foreach ($journals as $journal) {
|
||||
$currencyId = (int)$journal['currency_id'];
|
||||
$array[$currencyId] = $array[$currencyId] ?? [
|
||||
$array[$currencyId] ??= [
|
||||
'sum' => '0',
|
||||
'currency_id' => $currencyId,
|
||||
'currency_name' => $journal['currency_name'],
|
||||
|
||||
@@ -81,7 +81,7 @@ class OperationsRepository implements OperationsRepositoryInterface
|
||||
}
|
||||
|
||||
// info about the currency:
|
||||
$array[$currencyId] = $array[$currencyId] ?? [
|
||||
$array[$currencyId] ??= [
|
||||
'categories' => [],
|
||||
'currency_id' => (string)$currencyId,
|
||||
'currency_name' => $journal['currency_name'],
|
||||
@@ -91,7 +91,7 @@ class OperationsRepository implements OperationsRepositoryInterface
|
||||
];
|
||||
|
||||
// info about the categories:
|
||||
$array[$currencyId]['categories'][$categoryId] = $array[$currencyId]['categories'][$categoryId] ?? [
|
||||
$array[$currencyId]['categories'][$categoryId] ??= [
|
||||
'id' => (string)$categoryId,
|
||||
'name' => $categoryName,
|
||||
'transaction_journals' => [],
|
||||
@@ -177,7 +177,7 @@ class OperationsRepository implements OperationsRepositoryInterface
|
||||
}
|
||||
|
||||
// info about the currency:
|
||||
$array[$currencyId] = $array[$currencyId] ?? [
|
||||
$array[$currencyId] ??= [
|
||||
'categories' => [],
|
||||
'currency_id' => (string)$currencyId,
|
||||
'currency_name' => $journal['currency_name'],
|
||||
@@ -187,7 +187,7 @@ class OperationsRepository implements OperationsRepositoryInterface
|
||||
];
|
||||
|
||||
// info about the categories:
|
||||
$array[$currencyId]['categories'][$categoryId] = $array[$currencyId]['categories'][$categoryId] ?? [
|
||||
$array[$currencyId]['categories'][$categoryId] ??= [
|
||||
'id' => (string)$categoryId,
|
||||
'name' => $categoryName,
|
||||
'transaction_journals' => [],
|
||||
@@ -241,7 +241,7 @@ class OperationsRepository implements OperationsRepositoryInterface
|
||||
}
|
||||
|
||||
// info about the currency:
|
||||
$array[$currencyId] = $array[$currencyId] ?? [
|
||||
$array[$currencyId] ??= [
|
||||
'categories' => [],
|
||||
'currency_id' => (string)$currencyId,
|
||||
'currency_name' => $journal['currency_name'],
|
||||
@@ -251,7 +251,7 @@ class OperationsRepository implements OperationsRepositoryInterface
|
||||
];
|
||||
|
||||
// info about the categories:
|
||||
$array[$currencyId]['categories'][$categoryId] = $array[$currencyId]['categories'][$categoryId] ?? [
|
||||
$array[$currencyId]['categories'][$categoryId] ??= [
|
||||
'id' => (string)$categoryId,
|
||||
'name' => $categoryName,
|
||||
'transaction_journals' => [],
|
||||
@@ -306,7 +306,7 @@ class OperationsRepository implements OperationsRepositoryInterface
|
||||
}
|
||||
|
||||
// info about the currency:
|
||||
$array[$currencyId] = $array[$currencyId] ?? [
|
||||
$array[$currencyId] ??= [
|
||||
'categories' => [],
|
||||
'currency_id' => (string)$currencyId,
|
||||
'currency_name' => $journal['currency_name'],
|
||||
@@ -316,7 +316,7 @@ class OperationsRepository implements OperationsRepositoryInterface
|
||||
];
|
||||
|
||||
// info about the categories:
|
||||
$array[$currencyId]['categories'][$categoryId] = $array[$currencyId]['categories'][$categoryId] ?? [
|
||||
$array[$currencyId]['categories'][$categoryId] ??= [
|
||||
'id' => (string)$categoryId,
|
||||
'name' => $categoryName,
|
||||
'transaction_journals' => [],
|
||||
@@ -371,7 +371,7 @@ class OperationsRepository implements OperationsRepositoryInterface
|
||||
|
||||
foreach ($journals as $journal) {
|
||||
$currencyId = (int)$journal['currency_id'];
|
||||
$array[$currencyId] = $array[$currencyId] ?? [
|
||||
$array[$currencyId] ??= [
|
||||
'sum' => '0',
|
||||
'currency_id' => (string)$currencyId,
|
||||
'currency_name' => $journal['currency_name'],
|
||||
@@ -414,7 +414,7 @@ class OperationsRepository implements OperationsRepositoryInterface
|
||||
|
||||
foreach ($journals as $journal) {
|
||||
$currencyId = (int)$journal['currency_id'];
|
||||
$array[$currencyId] = $array[$currencyId] ?? [
|
||||
$array[$currencyId] ??= [
|
||||
'sum' => '0',
|
||||
'currency_id' => (string)$currencyId,
|
||||
'currency_name' => $journal['currency_name'],
|
||||
@@ -457,7 +457,7 @@ class OperationsRepository implements OperationsRepositoryInterface
|
||||
|
||||
foreach ($journals as $journal) {
|
||||
$currencyId = (int)$journal['currency_id'];
|
||||
$array[$currencyId] = $array[$currencyId] ?? [
|
||||
$array[$currencyId] ??= [
|
||||
'sum' => '0',
|
||||
'currency_id' => (string)$currencyId,
|
||||
'currency_name' => $journal['currency_name'],
|
||||
|
||||
Reference in New Issue
Block a user