diff --git a/app/Api/V1/Controllers/Summary/BasicController.php b/app/Api/V1/Controllers/Summary/BasicController.php index a18e9537ba..900ff8c8a2 100644 --- a/app/Api/V1/Controllers/Summary/BasicController.php +++ b/app/Api/V1/Controllers/Summary/BasicController.php @@ -167,7 +167,7 @@ class BasicController extends Controller ], ]; $newIncomes = [ - $primary->id => [ + $primary->id => [ 'currency_id' => $primary->id, 'currency_code' => $primary->code, 'currency_symbol' => $primary->symbol, @@ -176,7 +176,7 @@ class BasicController extends Controller ], ]; $sums = [ - $primary->id => [ + $primary->id => [ 'currency_id' => $primary->id, 'currency_code' => $primary->code, 'currency_symbol' => $primary->symbol, @@ -244,7 +244,7 @@ class BasicController extends Controller // create objects for big array. $return[] = [ 'key' => sprintf('balance-in-%s', $currency->code), - 'title' => trans('firefly.box_balance_in_currency', ['currency' => $currency->symbol]), + 'title' => trans('firefly.box_balance_in_currency', ['currency' => $currency->symbol]), 'monetary_value' => $sums[$currencyId]['sum'] ?? '0', 'currency_id' => (string) $currency->id, 'currency_code' => $currency->code, @@ -258,7 +258,7 @@ class BasicController extends Controller ]; $return[] = [ 'key' => sprintf('spent-in-%s', $currency->code), - 'title' => trans('firefly.box_spent_in_currency', ['currency' => $currency->symbol]), + 'title' => trans('firefly.box_spent_in_currency', ['currency' => $currency->symbol]), 'monetary_value' => $expenses[$currencyId]['sum'] ?? '0', 'currency_id' => (string) $currency->id, 'currency_code' => $currency->code, @@ -270,7 +270,7 @@ class BasicController extends Controller ]; $return[] = [ 'key' => sprintf('earned-in-%s', $currency->code), - 'title' => trans('firefly.box_earned_in_currency', ['currency' => $currency->symbol]), + 'title' => trans('firefly.box_earned_in_currency', ['currency' => $currency->symbol]), 'monetary_value' => $incomes[$currencyId]['sum'] ?? '0', 'currency_id' => (string) $currency->id, 'currency_code' => $currency->code, @@ -286,7 +286,7 @@ class BasicController extends Controller // create objects for big array. $return[] = [ 'key' => sprintf('balance-in-%s', $currency->code), - 'title' => trans('firefly.box_balance_in_currency', ['currency' => $currency->symbol]), + 'title' => trans('firefly.box_balance_in_currency', ['currency' => $currency->symbol]), 'monetary_value' => '0', 'currency_id' => (string) $currency->id, 'currency_code' => $currency->code, @@ -298,7 +298,7 @@ class BasicController extends Controller ]; $return[] = [ 'key' => sprintf('spent-in-%s', $currency->code), - 'title' => trans('firefly.box_spent_in_currency', ['currency' => $currency->symbol]), + 'title' => trans('firefly.box_spent_in_currency', ['currency' => $currency->symbol]), 'monetary_value' => '0', 'currency_id' => (string) $currency->id, 'currency_code' => $currency->code, @@ -310,7 +310,7 @@ class BasicController extends Controller ]; $return[] = [ 'key' => sprintf('earned-in-%s', $currency->code), - 'title' => trans('firefly.box_earned_in_currency', ['currency' => $currency->symbol]), + 'title' => trans('firefly.box_earned_in_currency', ['currency' => $currency->symbol]), 'monetary_value' => '0', 'currency_id' => (string) $currency->id, 'currency_code' => $currency->code, @@ -345,7 +345,7 @@ class BasicController extends Controller $currencies[$currencyId] ??= $this->currencyRepos->find($currencyId); $return[$currencyId] = [ 'key' => sprintf('left-to-spend-in-%s', $currencies[$currencyId]->code), - 'title' => trans('firefly.box_left_to_spend_in_currency', ['currency' => $currencies[$currencyId]->symbol]), + 'title' => trans('firefly.box_left_to_spend_in_currency', ['currency' => $currencies[$currencyId]->symbol]), 'no_available_budgets' => false, 'monetary_value' => $availableBudget, 'currency_id' => (string) $currencies[$currencyId]->id, @@ -386,7 +386,7 @@ class BasicController extends Controller $return[$currencyId] = [ 'key' => sprintf('left-to-spend-in-%s', $row['currency_code']), - 'title' => trans('firefly.box_left_to_spend_in_currency', ['currency' => $row['currency_symbol']]), + 'title' => trans('firefly.box_left_to_spend_in_currency', ['currency' => $row['currency_symbol']]), 'no_available_budgets' => false, 'monetary_value' => $leftToSpend, 'currency_id' => (string) $row['currency_id'], @@ -493,7 +493,7 @@ class BasicController extends Controller // return stuff $return[] = [ 'key' => sprintf('net-worth-in-%s', $data['currency_code']), - 'title' => trans('firefly.box_net_worth_in_currency', ['currency' => $data['currency_symbol']]), + 'title' => trans('firefly.box_net_worth_in_currency', ['currency' => $data['currency_symbol']]), 'monetary_value' => $amount, 'currency_id' => (string) $data['currency_id'], 'currency_code' => $data['currency_code'], @@ -507,7 +507,7 @@ class BasicController extends Controller if (0 === count($return)) { $return[] = [ 'key' => sprintf('net-worth-in-%s', $this->primaryCurrency->code), - 'title' => trans('firefly.box_net_worth_in_currency', ['currency' => $this->primaryCurrency->symbol]), + 'title' => trans('firefly.box_net_worth_in_currency', ['currency' => $this->primaryCurrency->symbol]), 'monetary_value' => '0', 'currency_id' => (string) $this->primaryCurrency->id, 'currency_code' => $this->primaryCurrency->code, @@ -533,7 +533,7 @@ class BasicController extends Controller */ $paidAmount = $this->billRepository->sumPaidInRange($start, $end); $unpaidAmount = $this->billRepository->sumUnpaidInRange($start, $end); - $currencies = [$this->primaryCurrency->id => $this->primaryCurrency]; + $currencies = [$this->primaryCurrency->id => $this->primaryCurrency]; if ($this->convertToPrimary) { $converter = new ExchangeRateConverter(); @@ -598,7 +598,7 @@ class BasicController extends Controller $amount = bcmul((string) $info['sum'], '-1'); $return[] = [ 'key' => sprintf('bills-paid-in-%s', $info['code']), - 'title' => trans('firefly.box_bill_paid_in_currency', ['currency' => $info['symbol']]), + 'title' => trans('firefly.box_bill_paid_in_currency', ['currency' => $info['symbol']]), 'monetary_value' => $amount, 'currency_id' => (string) $info['id'], 'currency_code' => $info['code'], @@ -617,7 +617,7 @@ class BasicController extends Controller $amount = bcmul((string) $info['sum'], '-1'); $return[] = [ 'key' => sprintf('bills-unpaid-in-%s', $info['code']), - 'title' => trans('firefly.box_bill_unpaid_in_currency', ['currency' => $info['symbol']]), + 'title' => trans('firefly.box_bill_unpaid_in_currency', ['currency' => $info['symbol']]), 'monetary_value' => $amount, 'currency_id' => (string) $info['id'], 'currency_code' => $info['code'], @@ -636,7 +636,7 @@ class BasicController extends Controller $return[] = [ 'key' => sprintf('bills-paid-in-%s', $currency->code), - 'title' => trans('firefly.box_bill_paid_in_currency', ['currency' => $currency->symbol]), + 'title' => trans('firefly.box_bill_paid_in_currency', ['currency' => $currency->symbol]), 'monetary_value' => '0', 'currency_id' => (string) $currency->id, 'currency_code' => $currency->code, @@ -648,7 +648,7 @@ class BasicController extends Controller ]; $return[] = [ 'key' => sprintf('bills-unpaid-in-%s', $currency->code), - 'title' => trans('firefly.box_bill_unpaid_in_currency', ['currency' => $currency->symbol]), + 'title' => trans('firefly.box_bill_unpaid_in_currency', ['currency' => $currency->symbol]), 'monetary_value' => '0', 'currency_id' => (string) $currency->id, 'currency_code' => $currency->code, diff --git a/app/Api/V1/Requests/Models/Transaction/UpdateRequest.php b/app/Api/V1/Requests/Models/Transaction/UpdateRequest.php index de60f42d69..854a7a6da1 100644 --- a/app/Api/V1/Requests/Models/Transaction/UpdateRequest.php +++ b/app/Api/V1/Requests/Models/Transaction/UpdateRequest.php @@ -113,7 +113,7 @@ class UpdateRequest extends FormRequest ]; $this->booleanFields = ['reconciled']; $this->arrayFields = ['tags']; - $data = ['batch_submission' => false]; + $data = ['batch_submission' => false]; if ($this->has('transactions')) { $data['transactions'] = $this->getTransactionData(); } diff --git a/app/Console/Commands/Correction/CorrectsMetaDataFields.php b/app/Console/Commands/Correction/CorrectsMetaDataFields.php index 0ab37c516e..82adce9563 100644 --- a/app/Console/Commands/Correction/CorrectsMetaDataFields.php +++ b/app/Console/Commands/Correction/CorrectsMetaDataFields.php @@ -68,7 +68,7 @@ class CorrectsMetaDataFields extends Command private function rename(string $original, string $update): void { - $total = DB::table('journal_meta')->where('name', '=', $original)->update(['name' => $update]); + $total = DB::table('journal_meta')->where('name', '=', $original)->update(['name' => $update]); $this->count += $total; } } diff --git a/app/Console/Commands/Upgrade/UpgradesBillsToRules.php b/app/Console/Commands/Upgrade/UpgradesBillsToRules.php index 3ed92b79ee..2ca31403bb 100644 --- a/app/Console/Commands/Upgrade/UpgradesBillsToRules.php +++ b/app/Console/Commands/Upgrade/UpgradesBillsToRules.php @@ -110,7 +110,7 @@ class UpgradesBillsToRules extends Command 'active' => true, 'strict' => false, 'stop_processing' => false, // field is no longer used. - 'title' => (string) trans('firefly.rule_for_bill_title', ['name' => $bill->name], $languageString), + 'title' => (string) trans('firefly.rule_for_bill_title', ['name' => $bill->name], $languageString), 'description' => (string) trans('firefly.rule_for_bill_description', ['name' => $bill->name], $languageString), 'trigger' => 'store-journal', 'triggers' => [['type' => 'description_contains', 'value' => $match]], diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index f541f86978..2025031907 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -157,7 +157,7 @@ class Handler extends ExceptionHandler return response()->json([ 'message' => sprintf('Validation exception: %s', $e->getMessage()), - 'errors' => ['field' => 'Field is invalid'], + 'errors' => ['field' => 'Field is invalid'], ], $errorCode); } diff --git a/app/Http/Controllers/Account/DeleteController.php b/app/Http/Controllers/Account/DeleteController.php index b6bd7dc695..721475b0f3 100644 --- a/app/Http/Controllers/Account/DeleteController.php +++ b/app/Http/Controllers/Account/DeleteController.php @@ -72,7 +72,7 @@ class DeleteController extends Controller } $typeName = config(sprintf('firefly.shortNamesByFullName.%s', $account->accountType->type)); - $subTitle = (string) trans(sprintf('firefly.delete_%s_account', $typeName), ['name' => $account->name]); + $subTitle = (string) trans(sprintf('firefly.delete_%s_account', $typeName), ['name' => $account->name]); $accountList = app('expandedform')->makeSelectListWithEmpty($this->repository->getAccountsByType([$account->accountType->type])); $objectType = $typeName; unset($accountList[$account->id]); diff --git a/app/Http/Controllers/Account/EditController.php b/app/Http/Controllers/Account/EditController.php index a2bc58c6b0..aac979cbab 100644 --- a/app/Http/Controllers/Account/EditController.php +++ b/app/Http/Controllers/Account/EditController.php @@ -86,7 +86,7 @@ class EditController extends Controller } $objectType = config('firefly.shortNamesByFullName')[$account->accountType->type]; - $subTitle = (string) trans(sprintf('firefly.edit_%s_account', $objectType), ['name' => $account->name]); + $subTitle = (string) trans(sprintf('firefly.edit_%s_account', $objectType), ['name' => $account->name]); $subTitleIcon = config(sprintf('firefly.subIconsByIdentifier.%s', $objectType)); $roles = $this->getRoles(); $liabilityTypes = $this->getLiabilityTypes(); diff --git a/app/Http/Controllers/Account/ReconcileController.php b/app/Http/Controllers/Account/ReconcileController.php index a3ab1c94fd..2d13fe0d56 100644 --- a/app/Http/Controllers/Account/ReconcileController.php +++ b/app/Http/Controllers/Account/ReconcileController.php @@ -137,7 +137,7 @@ class ReconcileController extends Controller ); $subTitleIcon = config(sprintf('firefly.subIconsByIdentifier.%s', $account->accountType->type)); - $subTitle = (string) trans('firefly.reconcile_account', ['account' => $account->name]); + $subTitle = (string) trans('firefly.reconcile_account', ['account' => $account->name]); // various links $transactionsUrl = route('accounts.reconcile.transactions', [$account->id, '%start%', '%end%']); diff --git a/app/Http/Controllers/Account/ShowController.php b/app/Http/Controllers/Account/ShowController.php index be68e9280c..e44954248b 100644 --- a/app/Http/Controllers/Account/ShowController.php +++ b/app/Http/Controllers/Account/ShowController.php @@ -219,7 +219,7 @@ class ShowController extends Controller $page = (int) $request->get('page'); $pageSize = (int) Preferences::get('listPageSize', 50)->data; $currency = $this->repository->getAccountCurrency($account) ?? $this->primaryCurrency; - $subTitle = (string) trans('firefly.all_journals_for_account', ['name' => $account->name]); + $subTitle = (string) trans('firefly.all_journals_for_account', ['name' => $account->name]); $periods = new Collection(); $end->endOfDay(); diff --git a/app/Http/Controllers/Admin/LinkController.php b/app/Http/Controllers/Admin/LinkController.php index e80c824032..4e1d97c617 100644 --- a/app/Http/Controllers/Admin/LinkController.php +++ b/app/Http/Controllers/Admin/LinkController.php @@ -94,7 +94,7 @@ class LinkController extends Controller } Log::channel('audit')->info(sprintf('User wants to delete link type #%d', $linkType->id)); - $subTitle = (string) trans('firefly.delete_link_type', ['name' => $linkType->name]); + $subTitle = (string) trans('firefly.delete_link_type', ['name' => $linkType->name]); $otherTypes = $this->repository->get(); $count = $this->repository->countJournals($linkType); $moveTo = []; @@ -141,7 +141,7 @@ class LinkController extends Controller return redirect(route('settings.links.index')); } - $subTitle = (string) trans('firefly.edit_link_type', ['name' => $linkType->name]); + $subTitle = (string) trans('firefly.edit_link_type', ['name' => $linkType->name]); $subTitleIcon = 'fa-link'; Log::channel('audit')->info(sprintf('User wants to edit link type #%d', $linkType->id)); @@ -181,7 +181,7 @@ class LinkController extends Controller */ public function show(LinkType $linkType): Factory|\Illuminate\Contracts\View\View { - $subTitle = (string) trans('firefly.overview_for_link', ['name' => $linkType->name]); + $subTitle = (string) trans('firefly.overview_for_link', ['name' => $linkType->name]); $subTitleIcon = 'fa-link'; $links = $this->repository->getJournalLinks($linkType); diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index e0f3c57aa2..e278d878a2 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -135,7 +135,7 @@ class UserController extends Controller } session()->forget('users.edit.fromUpdate'); - $subTitle = (string) trans('firefly.edit_user', ['email' => $user->email]); + $subTitle = (string) trans('firefly.edit_user', ['email' => $user->email]); $subTitleIcon = 'fa-user-o'; $currentUser = auth()->user(); $isAdmin = $this->repository->hasRole($user, 'owner'); @@ -216,7 +216,7 @@ class UserController extends Controller { $title = (string) trans('firefly.system_settings'); $mainTitleIcon = 'fa-hand-spock-o'; - $subTitle = (string) trans('firefly.single_user_administration', ['email' => $user->email]); + $subTitle = (string) trans('firefly.single_user_administration', ['email' => $user->email]); $subTitleIcon = 'fa-user'; $information = $this->repository->getUserData($user); diff --git a/app/Http/Controllers/AttachmentController.php b/app/Http/Controllers/AttachmentController.php index 50c63a76ca..dc7a4fe8e7 100644 --- a/app/Http/Controllers/AttachmentController.php +++ b/app/Http/Controllers/AttachmentController.php @@ -131,7 +131,7 @@ class AttachmentController extends Controller public function edit(Request $request, Attachment $attachment): Factory|\Illuminate\Contracts\View\View { $subTitleIcon = 'fa-pencil'; - $subTitle = (string) trans('firefly.edit_attachment', ['name' => $attachment->filename]); + $subTitle = (string) trans('firefly.edit_attachment', ['name' => $attachment->filename]); // put previous url in session if not redirect from store (not "return_to_edit"). if (true !== session('attachments.edit.fromUpdate')) { diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 8fd8b4b540..c76ed101b5 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -251,7 +251,7 @@ class LoginController extends Controller */ protected function sendFailedLoginResponse(Request $request): void { - $exception = ValidationException::withMessages([$this->username() => [trans('auth.failed')]]); + $exception = ValidationException::withMessages([$this->username() => [trans('auth.failed')]]); $exception->redirectTo = route('login'); throw $exception; diff --git a/app/Http/Controllers/Budget/EditController.php b/app/Http/Controllers/Budget/EditController.php index 46951e0797..8322cdd4f8 100644 --- a/app/Http/Controllers/Budget/EditController.php +++ b/app/Http/Controllers/Budget/EditController.php @@ -71,7 +71,7 @@ class EditController extends Controller */ public function edit(Request $request, Budget $budget): Factory|\Illuminate\Contracts\View\View { - $subTitle = (string) trans('firefly.edit_budget', ['name' => $budget->name]); + $subTitle = (string) trans('firefly.edit_budget', ['name' => $budget->name]); $autoBudget = $this->repository->getAutoBudget($budget); // auto budget types diff --git a/app/Http/Controllers/Chart/BillController.php b/app/Http/Controllers/Chart/BillController.php index eeb13c97a1..cc81cad6e4 100644 --- a/app/Http/Controllers/Chart/BillController.php +++ b/app/Http/Controllers/Chart/BillController.php @@ -73,7 +73,7 @@ class BillController extends Controller */ foreach ($paid as $info) { $amount = $info['sum']; - $label = (string) trans('firefly.paid_in_currency', ['currency' => $info['name']]); + $label = (string) trans('firefly.paid_in_currency', ['currency' => $info['name']]); $chartData[$label] = ['amount' => $amount, 'currency_symbol' => $info['symbol'], 'currency_code' => $info['code']]; } @@ -82,7 +82,7 @@ class BillController extends Controller */ foreach ($unpaid as $info) { $amount = $info['sum']; - $label = (string) trans('firefly.unpaid_in_currency', ['currency' => $info['name']]); + $label = (string) trans('firefly.unpaid_in_currency', ['currency' => $info['name']]); $chartData[$label] = ['amount' => $amount, 'currency_symbol' => $info['symbol'], 'currency_code' => $info['code']]; } diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.php index a080397b4a..7cc24f4c70 100644 --- a/app/Http/Controllers/Chart/BudgetController.php +++ b/app/Http/Controllers/Chart/BudgetController.php @@ -505,14 +505,14 @@ class BudgetController extends Controller $preferredRange = Navigation::preferredRangeFormat($start, $end); $chartData = [ [ - 'label' => (string) trans('firefly.box_spent_in_currency', ['currency' => $currency->name]), + 'label' => (string) trans('firefly.box_spent_in_currency', ['currency' => $currency->name]), 'type' => 'bar', 'entries' => [], 'currency_symbol' => $currency->symbol, 'currency_code' => $currency->code, ], [ - 'label' => (string) trans('firefly.box_budgeted_in_currency', ['currency' => $currency->name]), + 'label' => (string) trans('firefly.box_budgeted_in_currency', ['currency' => $currency->name]), 'type' => 'bar', 'currency_symbol' => $currency->symbol, 'currency_code' => $currency->code, diff --git a/app/Http/Controllers/Chart/BudgetReportController.php b/app/Http/Controllers/Chart/BudgetReportController.php index f133c55053..33e937edd9 100644 --- a/app/Http/Controllers/Chart/BudgetReportController.php +++ b/app/Http/Controllers/Chart/BudgetReportController.php @@ -171,7 +171,7 @@ class BudgetReportController extends Controller $chartData[$spentKey] ??= [ 'label' => sprintf( '%s (%s)', - (string) trans('firefly.spent_in_specific_budget', ['budget' => $budget->name]), + (string) trans('firefly.spent_in_specific_budget', ['budget' => $budget->name]), $currency['currency_name'] ), 'type' => 'bar', diff --git a/app/Http/Controllers/Chart/CategoryReportController.php b/app/Http/Controllers/Chart/CategoryReportController.php index 0c61d6642e..6b79116ae3 100644 --- a/app/Http/Controllers/Chart/CategoryReportController.php +++ b/app/Http/Controllers/Chart/CategoryReportController.php @@ -216,7 +216,7 @@ class CategoryReportController extends Controller $chartData[$spentKey] ??= [ 'label' => sprintf( '%s (%s)', - (string) trans('firefly.spent_in_specific_category', ['category' => $category->name]), + (string) trans('firefly.spent_in_specific_category', ['category' => $category->name]), $currency['currency_name'] ), 'type' => 'bar', @@ -243,7 +243,7 @@ class CategoryReportController extends Controller $chartData[$spentKey] ??= [ 'label' => sprintf( '%s (%s)', - (string) trans('firefly.earned_in_specific_category', ['category' => $category->name]), + (string) trans('firefly.earned_in_specific_category', ['category' => $category->name]), $currency['currency_name'] ), 'type' => 'bar', diff --git a/app/Http/Controllers/Chart/DoubleReportController.php b/app/Http/Controllers/Chart/DoubleReportController.php index 675c09ea51..8219ad6501 100644 --- a/app/Http/Controllers/Chart/DoubleReportController.php +++ b/app/Http/Controllers/Chart/DoubleReportController.php @@ -162,11 +162,7 @@ class DoubleReportController extends Controller $name = $this->getCounterpartName($accounts, $account->id, $account->name, $account->iban); $chartData[$spentKey] ??= [ - 'label' => sprintf( - '%s (%s)', - (string) trans('firefly.spent_in_specific_double', ['account' => $name]), - $currency['currency_name'] - ), + 'label' => sprintf('%s (%s)', (string) trans('firefly.spent_in_specific_double', ['account' => $name]), $currency['currency_name']), 'type' => 'bar', 'currency_symbol' => $currency['currency_symbol'], 'currency_code' => $currency['currency_code'], @@ -188,11 +184,7 @@ class DoubleReportController extends Controller $name = $this->getCounterpartName($accounts, $account->id, $account->name, $account->iban); $chartData[$earnedKey] ??= [ - 'label' => sprintf( - '%s (%s)', - (string) trans('firefly.earned_in_specific_double', ['account' => $name]), - $currency['currency_name'] - ), + 'label' => sprintf('%s (%s)', (string) trans('firefly.earned_in_specific_double', ['account' => $name]), $currency['currency_name']), 'type' => 'bar', 'currency_symbol' => $currency['currency_symbol'], 'currency_code' => $currency['currency_code'], diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.php index 0c0fae8fda..6be306ccfd 100644 --- a/app/Http/Controllers/Chart/ReportController.php +++ b/app/Http/Controllers/Chart/ReportController.php @@ -212,7 +212,7 @@ class ReportController extends Controller foreach ($data as $currency) { Log::debug(sprintf('Now processing currency "%s"', $currency['currency_name'])); $income = [ - 'label' => (string) trans('firefly.box_earned_in_currency', ['currency' => $currency['currency_name']]), + 'label' => (string) trans('firefly.box_earned_in_currency', ['currency' => $currency['currency_name']]), 'type' => 'bar', 'backgroundColor' => 'rgba(0, 141, 76, 0.5)', // green 'currency_id' => $currency['currency_id'], @@ -221,7 +221,7 @@ class ReportController extends Controller 'entries' => [], ]; $expense = [ - 'label' => (string) trans('firefly.box_spent_in_currency', ['currency' => $currency['currency_name']]), + 'label' => (string) trans('firefly.box_spent_in_currency', ['currency' => $currency['currency_name']]), 'type' => 'bar', 'backgroundColor' => 'rgba(219, 68, 55, 0.5)', // red 'currency_id' => $currency['currency_id'], diff --git a/app/Http/Controllers/Chart/TagReportController.php b/app/Http/Controllers/Chart/TagReportController.php index 5c85c417a6..efad00cea5 100644 --- a/app/Http/Controllers/Chart/TagReportController.php +++ b/app/Http/Controllers/Chart/TagReportController.php @@ -220,11 +220,7 @@ class TagReportController extends Controller // add things to chart Data for each currency: $spentKey = sprintf('%d-spent', $currency['currency_id']); $chartData[$spentKey] ??= [ - 'label' => sprintf( - '%s (%s)', - (string) trans('firefly.spent_in_specific_tag', ['tag' => $tag->tag]), - $currency['currency_name'] - ), + 'label' => sprintf('%s (%s)', (string) trans('firefly.spent_in_specific_tag', ['tag' => $tag->tag]), $currency['currency_name']), 'type' => 'bar', 'currency_symbol' => $currency['currency_symbol'], 'currency_code' => $currency['currency_code'], @@ -247,11 +243,7 @@ class TagReportController extends Controller // add things to chart Data for each currency: $spentKey = sprintf('%d-earned', $currency['currency_id']); $chartData[$spentKey] ??= [ - 'label' => sprintf( - '%s (%s)', - (string) trans('firefly.earned_in_specific_tag', ['tag' => $tag->tag]), - $currency['currency_name'] - ), + 'label' => sprintf('%s (%s)', (string) trans('firefly.earned_in_specific_tag', ['tag' => $tag->tag]), $currency['currency_name']), 'type' => 'bar', 'currency_symbol' => $currency['currency_symbol'], 'currency_code' => $currency['currency_code'], diff --git a/app/Http/Controllers/Json/RecurrenceController.php b/app/Http/Controllers/Json/RecurrenceController.php index 10c4c14ec9..6cb301a44c 100644 --- a/app/Http/Controllers/Json/RecurrenceController.php +++ b/app/Http/Controllers/Json/RecurrenceController.php @@ -183,11 +183,11 @@ class RecurrenceController extends Controller $result = [ 'daily' => ['label' => (string) trans('firefly.recurring_daily'), 'selected' => str_starts_with($preSelected, 'daily')], $weekly => [ - 'label' => (string) trans('firefly.recurring_weekly', ['weekday' => $dayOfWeek]), + 'label' => (string) trans('firefly.recurring_weekly', ['weekday' => $dayOfWeek]), 'selected' => str_starts_with($preSelected, 'weekly'), ], $monthly => [ - 'label' => (string) trans('firefly.recurring_monthly', ['dayOfMonth' => $date->day]), + 'label' => (string) trans('firefly.recurring_monthly', ['dayOfMonth' => $date->day]), 'selected' => str_starts_with($preSelected, 'monthly'), ], $ndom => [ @@ -195,7 +195,7 @@ class RecurrenceController extends Controller 'selected' => str_starts_with($preSelected, 'ndom'), ], $yearly => [ - 'label' => (string) trans('firefly.recurring_yearly', ['date' => $yearlyDate]), + 'label' => (string) trans('firefly.recurring_yearly', ['date' => $yearlyDate]), 'selected' => str_starts_with($preSelected, 'yearly'), ], ]; diff --git a/app/Http/Controllers/ObjectGroup/DeleteController.php b/app/Http/Controllers/ObjectGroup/DeleteController.php index 3a7f8087d5..be322ed949 100644 --- a/app/Http/Controllers/ObjectGroup/DeleteController.php +++ b/app/Http/Controllers/ObjectGroup/DeleteController.php @@ -61,7 +61,7 @@ class DeleteController extends Controller */ public function delete(ObjectGroup $objectGroup): Factory|View { - $subTitle = (string) trans('firefly.delete_object_group', ['title' => $objectGroup->title]); + $subTitle = (string) trans('firefly.delete_object_group', ['title' => $objectGroup->title]); $piggyBanks = $objectGroup->piggyBanks()->count(); // put previous url in session diff --git a/app/Http/Controllers/ObjectGroup/EditController.php b/app/Http/Controllers/ObjectGroup/EditController.php index d2156380d3..c0e16e36ee 100644 --- a/app/Http/Controllers/ObjectGroup/EditController.php +++ b/app/Http/Controllers/ObjectGroup/EditController.php @@ -64,7 +64,7 @@ class EditController extends Controller */ public function edit(ObjectGroup $objectGroup): Factory|View { - $subTitle = (string) trans('firefly.edit_object_group', ['title' => $objectGroup->title]); + $subTitle = (string) trans('firefly.edit_object_group', ['title' => $objectGroup->title]); $subTitleIcon = 'fa-pencil'; if (true !== session('object-groups.edit.fromUpdate')) { diff --git a/app/Http/Controllers/PiggyBank/EditController.php b/app/Http/Controllers/PiggyBank/EditController.php index 1b20650cd8..b94b6ee88a 100644 --- a/app/Http/Controllers/PiggyBank/EditController.php +++ b/app/Http/Controllers/PiggyBank/EditController.php @@ -70,7 +70,7 @@ class EditController extends Controller */ public function edit(PiggyBank $piggyBank): Factory|\Illuminate\Contracts\View\View { - $subTitle = (string) trans('firefly.update_piggy_title', ['name' => $piggyBank->name]); + $subTitle = (string) trans('firefly.update_piggy_title', ['name' => $piggyBank->name]); $subTitleIcon = 'fa-pencil'; $note = $piggyBank->notes()->first(); // Flash some data to fill the form. diff --git a/app/Http/Controllers/Rule/CreateController.php b/app/Http/Controllers/Rule/CreateController.php index 614b8faa8b..0dd94fa856 100644 --- a/app/Http/Controllers/Rule/CreateController.php +++ b/app/Http/Controllers/Rule/CreateController.php @@ -80,7 +80,7 @@ class CreateController extends Controller public function create(Request $request, ?RuleGroup $ruleGroup = null): Factory|\Illuminate\Contracts\View\View { $this->createDefaultRuleGroup(); - $preFilled = ['strict' => true]; + $preFilled = ['strict' => true]; $oldTriggers = []; $oldActions = []; @@ -159,7 +159,7 @@ class CreateController extends Controller $this->createDefaultRuleGroup(); $preFilled = [ 'strict' => true, - 'title' => (string) trans('firefly.new_rule_for_bill_title', ['name' => $bill->name]), + 'title' => (string) trans('firefly.new_rule_for_bill_title', ['name' => $bill->name]), 'description' => (string) trans('firefly.new_rule_for_bill_description', ['name' => $bill->name]), ]; @@ -221,7 +221,7 @@ class CreateController extends Controller // collect pre-filled information: $preFilled = [ 'strict' => true, - 'title' => (string) trans('firefly.new_rule_for_journal_title', ['description' => $journal->description]), + 'title' => (string) trans('firefly.new_rule_for_journal_title', ['description' => $journal->description]), 'description' => (string) trans('firefly.new_rule_for_journal_description', ['description' => $journal->description]), ]; diff --git a/app/Http/Controllers/RuleGroup/EditController.php b/app/Http/Controllers/RuleGroup/EditController.php index cc034d30de..bb2cab2cbb 100644 --- a/app/Http/Controllers/RuleGroup/EditController.php +++ b/app/Http/Controllers/RuleGroup/EditController.php @@ -70,7 +70,7 @@ class EditController extends Controller $subTitle = (string) trans('firefly.edit_rule_group', ['title' => $ruleGroup->title]); $hasOldInput = null !== $request->old('_token'); - $preFilled = ['active' => $hasOldInput ? (bool) $request->old('active') : $ruleGroup->active]; + $preFilled = ['active' => $hasOldInput ? (bool) $request->old('active') : $ruleGroup->active]; // put previous url in session if not redirect from store (not "return_to_edit"). if (true !== session('rule-groups.edit.fromUpdate')) { $this->rememberPreviousUrl('rule-groups.edit.url'); diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php index f4b831210e..39cadb753f 100644 --- a/app/Http/Controllers/SearchController.php +++ b/app/Http/Controllers/SearchController.php @@ -87,7 +87,7 @@ class SearchController extends Controller $excludedWords = $searcher->getExcludedWords(); $operators = $searcher->getOperators(); $invalidOperators = $searcher->getInvalidOperators(); - $subTitle = (string) trans('breadcrumbs.search_result', ['query' => $fullQuery]); + $subTitle = (string) trans('breadcrumbs.search_result', ['query' => $fullQuery]); return view('search.index', [ 'words' => $words, diff --git a/app/Http/Controllers/System/InstallController.php b/app/Http/Controllers/System/InstallController.php index da5f92a183..c7270acf2e 100644 --- a/app/Http/Controllers/System/InstallController.php +++ b/app/Http/Controllers/System/InstallController.php @@ -61,7 +61,7 @@ class InstallController extends Controller 'migrate' => ['--seed' => true, '--force' => true], 'generate-keys' => [], // an exception :( 'firefly-iii:upgrade-database' => [], - 'firefly-iii:set-latest-version' => ['--james-is-cool' => true], + 'firefly-iii:set-latest-version' => ['--james-is-cool' => true], 'firefly-iii:verify-security-alerts' => [], ]; diff --git a/app/Http/Controllers/TagController.php b/app/Http/Controllers/TagController.php index a42c75c44b..1e357ffca0 100644 --- a/app/Http/Controllers/TagController.php +++ b/app/Http/Controllers/TagController.php @@ -134,7 +134,7 @@ class TagController extends Controller */ public function edit(Tag $tag): Factory|\Illuminate\Contracts\View\View { - $subTitle = (string) trans('firefly.edit_tag', ['tag' => $tag->tag]); + $subTitle = (string) trans('firefly.edit_tag', ['tag' => $tag->tag]); $subTitleIcon = 'fa-tag'; $location = $this->repository->getLocation($tag); @@ -289,7 +289,7 @@ class TagController extends Controller $page = (int) $request->get('page'); $pageSize = (int) Preferences::get('listPageSize', 50)->data; $periods = []; - $subTitle = (string) trans('firefly.all_journals_for_tag', ['tag' => $tag->tag]); + $subTitle = (string) trans('firefly.all_journals_for_tag', ['tag' => $tag->tag]); $start = $this->repository->firstUseDate($tag) ?? today(config('app.timezone')); $end = $this->repository->lastUseDate($tag) ?? today(config('app.timezone')); $attachments = $this->repository->getAttachments($tag); diff --git a/app/Http/Controllers/Transaction/ConvertController.php b/app/Http/Controllers/Transaction/ConvertController.php index 67a988fffa..767945598b 100644 --- a/app/Http/Controllers/Transaction/ConvertController.php +++ b/app/Http/Controllers/Transaction/ConvertController.php @@ -103,7 +103,7 @@ class ConvertController extends Controller $groupTitle = $group->title ?? $first->description; $groupArray = $transformer->transformObject($group); - $subTitle = (string) trans('firefly.convert_to_'.$destinationType->type, ['description' => $groupTitle]); + $subTitle = (string) trans('firefly.convert_to_'.$destinationType->type, ['description' => $groupTitle]); $subTitleIcon = 'fa-exchange'; // get a list of asset accounts and liabilities and stuff, in various combinations: diff --git a/app/Http/Controllers/Transaction/DeleteController.php b/app/Http/Controllers/Transaction/DeleteController.php index 2ef1397d7d..5cc39fb0e7 100644 --- a/app/Http/Controllers/Transaction/DeleteController.php +++ b/app/Http/Controllers/Transaction/DeleteController.php @@ -77,7 +77,7 @@ class DeleteController extends Controller throw new NotFoundHttpException(); } $objectType = strtolower($journal->transaction_type_type ?? $journal->transactionType->type); - $subTitle = (string) trans('firefly.delete_'.$objectType, ['description' => $group->title ?? $journal->description]); + $subTitle = (string) trans('firefly.delete_'.$objectType, ['description' => $group->title ?? $journal->description]); $previous = Steam::getSafePreviousUrl(); // put previous url in session Log::debug('Will try to remember previous URL'); diff --git a/app/Http/Controllers/Transaction/EditController.php b/app/Http/Controllers/Transaction/EditController.php index c47e4bb2cd..67d2853f99 100644 --- a/app/Http/Controllers/Transaction/EditController.php +++ b/app/Http/Controllers/Transaction/EditController.php @@ -91,7 +91,7 @@ class EditController extends Controller $title = $transactionGroup->transactionJournals()->count() > 1 ? $transactionGroup->title : $transactionGroup->transactionJournals()->first()->description; - $subTitle = (string) trans('firefly.edit_transaction_title', ['description' => $title]); + $subTitle = (string) trans('firefly.edit_transaction_title', ['description' => $title]); $subTitleIcon = 'fa-plus'; $cash = $repository->getCashAccount(); $previousUrl = $this->rememberPreviousUrl('transactions.edit.url'); diff --git a/app/Http/Controllers/TransactionCurrency/EditController.php b/app/Http/Controllers/TransactionCurrency/EditController.php index 4095a8bbe6..276d525ec1 100644 --- a/app/Http/Controllers/TransactionCurrency/EditController.php +++ b/app/Http/Controllers/TransactionCurrency/EditController.php @@ -78,7 +78,7 @@ class EditController extends Controller } $subTitleIcon = 'fa-pencil'; - $subTitle = (string) trans('breadcrumbs.edit_currency', ['name' => $currency->name]); + $subTitle = (string) trans('breadcrumbs.edit_currency', ['name' => $currency->name]); $currency->symbol = htmlentities($currency->symbol); // is currently enabled (for this user?) @@ -91,7 +91,7 @@ class EditController extends Controller // code to handle active-checkboxes $hasOldInput = null !== $request->old('_token'); - $preFilled = ['enabled' => $hasOldInput ? (bool) $request->old('enabled') : $enabled]; + $preFilled = ['enabled' => $hasOldInput ? (bool) $request->old('enabled') : $enabled]; $request->session()->flash('preFilled', $preFilled); Log::channel('audit')->info('Edit currency.', $currency->toArray()); diff --git a/app/Http/Controllers/UserGroup/EditController.php b/app/Http/Controllers/UserGroup/EditController.php index ee38cefce1..7ef7f96aef 100644 --- a/app/Http/Controllers/UserGroup/EditController.php +++ b/app/Http/Controllers/UserGroup/EditController.php @@ -39,7 +39,7 @@ class EditController extends Controller public function edit(UserGroup $userGroup) { $title = (string) trans('firefly.administrations_page_title'); - $subTitle = (string) trans('firefly.administrations_page_edit_sub_title', ['title' => $userGroup->title]); + $subTitle = (string) trans('firefly.administrations_page_edit_sub_title', ['title' => $userGroup->title]); $mainTitleIcon = 'fa-book'; Log::debug(sprintf('Now at %s', __METHOD__)); diff --git a/app/Notifications/Security/MFABackupFewLeftNotification.php b/app/Notifications/Security/MFABackupFewLeftNotification.php index ee5b3f64cd..b03d127ece 100644 --- a/app/Notifications/Security/MFABackupFewLeftNotification.php +++ b/app/Notifications/Security/MFABackupFewLeftNotification.php @@ -56,7 +56,7 @@ class MFABackupFewLeftNotification extends Notification */ public function toMail(User $notifiable): MailMessage { - $subject = (string) trans('email.mfa_few_backups_left_subject', ['count' => $this->count]); + $subject = (string) trans('email.mfa_few_backups_left_subject', ['count' => $this->count]); $ip = Request::ip(); $host = Steam::getHostName($ip); $userAgent = Request::userAgent(); diff --git a/app/Notifications/Security/MFAManyFailedAttemptsNotification.php b/app/Notifications/Security/MFAManyFailedAttemptsNotification.php index cca7bde974..f14c5a16f1 100644 --- a/app/Notifications/Security/MFAManyFailedAttemptsNotification.php +++ b/app/Notifications/Security/MFAManyFailedAttemptsNotification.php @@ -53,7 +53,7 @@ class MFAManyFailedAttemptsNotification extends Notification */ public function toMail(User $notifiable): MailMessage { - $subject = (string) trans('email.mfa_many_failed_subject', ['count' => $this->count]); + $subject = (string) trans('email.mfa_many_failed_subject', ['count' => $this->count]); $ip = Request::ip(); $host = Steam::getHostName($ip); $userAgent = Request::userAgent(); diff --git a/app/Notifications/User/SubscriptionsOverdueReminder.php b/app/Notifications/User/SubscriptionsOverdueReminder.php index a5fe00757d..556a85a6bc 100644 --- a/app/Notifications/User/SubscriptionsOverdueReminder.php +++ b/app/Notifications/User/SubscriptionsOverdueReminder.php @@ -58,7 +58,7 @@ class SubscriptionsOverdueReminder extends Notification $info = []; $count = 0; foreach ($this->overdue as $item) { - $current = ['bill' => $item['bill']]; + $current = ['bill' => $item['bill']]; $current['pay_dates'] = array_map(static fn (string $date): string => new Carbon($date)->isoFormat((string) trans( 'config.month_and_day_moment_js' )), $item['dates']['pay_dates']); diff --git a/app/Repositories/Account/AccountTasker.php b/app/Repositories/Account/AccountTasker.php index e4e9c4cb77..5ff4d3a955 100644 --- a/app/Repositories/Account/AccountTasker.php +++ b/app/Repositories/Account/AccountTasker.php @@ -178,7 +178,7 @@ class AccountTasker implements AccountTaskerInterface, UserGroupInterface /** @var CurrencyRepositoryInterface $currencyRepos */ $currencyRepos = app(CurrencyRepositoryInterface::class); - $currencies = [$primaryCurrency->id => $primaryCurrency]; + $currencies = [$primaryCurrency->id => $primaryCurrency]; $report = ['accounts' => [], 'sums' => []]; /** @var array $journal */ @@ -232,7 +232,7 @@ class AccountTasker implements AccountTaskerInterface, UserGroupInterface /** @var CurrencyRepositoryInterface $currencyRepos */ $currencyRepos = app(CurrencyRepositoryInterface::class); - $currencies = [$primaryCurrency->id => $primaryCurrency]; + $currencies = [$primaryCurrency->id => $primaryCurrency]; $report = ['accounts' => [], 'sums' => []]; /** @var array $journal */ diff --git a/app/Repositories/Budget/OperationsRepository.php b/app/Repositories/Budget/OperationsRepository.php index 3c8b5331a3..97a3c84ea6 100644 --- a/app/Repositories/Budget/OperationsRepository.php +++ b/app/Repositories/Budget/OperationsRepository.php @@ -204,7 +204,7 @@ class OperationsRepository implements OperationsRepositoryInterface, UserGroupIn $currencySymbol = $primaryCurrency->symbol; $currencyDecimalPlaces = $primaryCurrency->decimal_places; $converter = new ExchangeRateConverter(); - $currencies = [$currencyId => $primaryCurrency]; + $currencies = [$currencyId => $primaryCurrency]; foreach ($journals as $journal) { $amount = Steam::negative($journal['amount']); diff --git a/app/Services/Internal/Support/AccountServiceTrait.php b/app/Services/Internal/Support/AccountServiceTrait.php index 1e83a66be9..1ab0013455 100644 --- a/app/Services/Internal/Support/AccountServiceTrait.php +++ b/app/Services/Internal/Support/AccountServiceTrait.php @@ -62,8 +62,8 @@ trait AccountServiceTrait if (null === $iban) { return null; } - $data = ['iban' => $iban]; - $rules = ['iban' => 'required|iban']; + $data = ['iban' => $iban]; + $rules = ['iban' => 'required|iban']; $validator = Validator::make($data, $rules); if ($validator->fails()) { Log::info(sprintf('Detected invalid IBAN ("%s"). Return NULL instead.', $iban)); @@ -228,7 +228,7 @@ trait AccountServiceTrait $sourceId = $account->id; $sourceName = null; $destId = null; - $destName = trans('firefly.liability_credit_description', ['account' => $account->name], $language); + $destName = trans('firefly.liability_credit_description', ['account' => $account->name], $language); } // amount must be positive for the transaction to work. @@ -257,7 +257,7 @@ trait AccountServiceTrait 'order' => 0, 'amount' => $amount, 'foreign_amount' => null, - 'description' => trans('firefly.liability_credit_description', ['account' => $account->name]), + 'description' => trans('firefly.liability_credit_description', ['account' => $account->name]), 'budget_id' => null, 'budget_name' => null, 'category_id' => null, @@ -352,7 +352,7 @@ trait AccountServiceTrait 'order' => 0, 'amount' => $amount, 'foreign_amount' => null, - 'description' => trans('firefly.initial_balance_description', ['account' => $account->name]), + 'description' => trans('firefly.initial_balance_description', ['account' => $account->name]), 'budget_id' => null, 'budget_name' => null, 'category_id' => null, @@ -444,7 +444,7 @@ trait AccountServiceTrait 'order' => 0, 'amount' => $amount, 'foreign_amount' => null, - 'description' => trans('firefly.initial_balance_description', ['account' => $account->name]), + 'description' => trans('firefly.initial_balance_description', ['account' => $account->name]), 'budget_id' => null, 'budget_name' => null, 'category_id' => null, diff --git a/app/Support/Calendar/Calculator.php b/app/Support/Calendar/Calculator.php index 555a48f9c5..b696790112 100644 --- a/app/Support/Calendar/Calculator.php +++ b/app/Support/Calendar/Calculator.php @@ -46,6 +46,7 @@ class Calculator // @phpstan-ignore-line // @phpstan-ignore-line // @phpstan-ignore-line + // @phpstan-ignore-line private static array $intervals = []; public function isAvailablePeriodicity(Periodicity $periodicity): bool diff --git a/app/Support/Chart/Category/WholePeriodChartGenerator.php b/app/Support/Chart/Category/WholePeriodChartGenerator.php index 14bca78ac9..afa43e01aa 100644 --- a/app/Support/Chart/Category/WholePeriodChartGenerator.php +++ b/app/Support/Chart/Category/WholePeriodChartGenerator.php @@ -81,14 +81,14 @@ class WholePeriodChartGenerator $code = $currency['currency_code']; $name = $currency['currency_name']; $chartData[sprintf('spent-in-%s', $code)] = [ - 'label' => (string) trans('firefly.box_spent_in_currency', ['currency' => $name]), + 'label' => (string) trans('firefly.box_spent_in_currency', ['currency' => $name]), 'entries' => [], 'type' => 'bar', 'backgroundColor' => 'rgba(219, 68, 55, 0.5)', // red ]; $chartData[sprintf('earned-in-%s', $code)] = [ - 'label' => (string) trans('firefly.box_earned_in_currency', ['currency' => $name]), + 'label' => (string) trans('firefly.box_earned_in_currency', ['currency' => $name]), 'entries' => [], 'type' => 'bar', 'backgroundColor' => 'rgba(0, 141, 76, 0.5)', // green diff --git a/app/Support/Export/ExportDataGenerator.php b/app/Support/Export/ExportDataGenerator.php index dde9d820e7..15419a137f 100644 --- a/app/Support/Export/ExportDataGenerator.php +++ b/app/Support/Export/ExportDataGenerator.php @@ -110,6 +110,8 @@ class ExportDataGenerator // @phpstan-ignore-line + // @phpstan-ignore-line + public function __construct() { $this->accounts = new Collection(); diff --git a/app/Support/Form/PiggyBankForm.php b/app/Support/Form/PiggyBankForm.php index 6a72123acf..d1e948b944 100644 --- a/app/Support/Form/PiggyBankForm.php +++ b/app/Support/Form/PiggyBankForm.php @@ -49,7 +49,7 @@ class PiggyBankForm $piggyBanks = $repository->getPiggyBanksWithAmount(); $title = (string) trans('firefly.default_group_title_name'); $array = []; - $subList = [0 => ['group' => ['title' => $title], 'piggies' => [(string) trans('firefly.none_in_select_list')]]]; + $subList = [0 => ['group' => ['title' => $title], 'piggies' => [(string) trans('firefly.none_in_select_list')]]]; /** @var PiggyBank $piggy */ foreach ($piggyBanks as $piggy) { @@ -60,7 +60,7 @@ class PiggyBankForm $groupTitle = $group->title; $groupOrder = $group->order; } - $subList[$groupOrder] ??= ['group' => ['title' => $groupTitle], 'piggies' => []]; + $subList[$groupOrder] ??= ['group' => ['title' => $groupTitle], 'piggies' => []]; $subList[$groupOrder]['piggies'][$piggy->id] = $piggy->name; } ksort($subList); diff --git a/app/Support/Http/Api/AccountBalanceGrouped.php b/app/Support/Http/Api/AccountBalanceGrouped.php index 4efe5c0aa7..3d2594a0d6 100644 --- a/app/Support/Http/Api/AccountBalanceGrouped.php +++ b/app/Support/Http/Api/AccountBalanceGrouped.php @@ -170,7 +170,7 @@ class AccountBalanceGrouped { $this->primary = $primary; $primaryCurrencyId = $primary->id; - $this->currencies = [$primary->id => $primary]; // currency cache + $this->currencies = [$primary->id => $primary]; // currency cache $this->data[$primaryCurrencyId] = [ 'currency_id' => (string) $primaryCurrencyId, 'currency_symbol' => $primary->symbol, diff --git a/app/Support/Http/Controllers/GetConfigurationData.php b/app/Support/Http/Controllers/GetConfigurationData.php index 2da8c02379..832110d68f 100644 --- a/app/Support/Http/Controllers/GetConfigurationData.php +++ b/app/Support/Http/Controllers/GetConfigurationData.php @@ -157,7 +157,7 @@ trait GetConfigurationData // previous year: $yearBegin = today(config('app.timezone'))->subYear()->startOfYear(); - $index = (string) trans('firefly.previous_year', ['year' => $yearBegin->year]); + $index = (string) trans('firefly.previous_year', ['year' => $yearBegin->year]); $ranges[$index] = [$yearBegin, $yearBegin->clone()->endOfYear()]; // everything diff --git a/app/Support/Http/Controllers/PeriodOverview.php b/app/Support/Http/Controllers/PeriodOverview.php index 8c1ffced91..d3601399e9 100644 --- a/app/Support/Http/Controllers/PeriodOverview.php +++ b/app/Support/Http/Controllers/PeriodOverview.php @@ -91,6 +91,7 @@ trait PeriodOverview // temp data holder // temp data holder // temp data holder + // temp data holder private array $transactions; // temp data holder // temp data holder @@ -113,6 +114,8 @@ trait PeriodOverview // temp data holder + // temp data holder + /** * This method returns "period entries", so nov-2015, dec-2015, etc. (this depends on the users session range) * and for each period, the amount of money spent and earned. This is a complex operation which is cached for diff --git a/app/Support/JsonApi/Enrichments/AvailableBudgetEnrichment.php b/app/Support/JsonApi/Enrichments/AvailableBudgetEnrichment.php index e6021870ec..23dfc557b2 100644 --- a/app/Support/JsonApi/Enrichments/AvailableBudgetEnrichment.php +++ b/app/Support/JsonApi/Enrichments/AvailableBudgetEnrichment.php @@ -51,6 +51,7 @@ class AvailableBudgetEnrichment implements EnrichmentInterface // @phpstan-ignore-line // @phpstan-ignore-line // @phpstan-ignore-line + // @phpstan-ignore-line private readonly bool $convertToPrimary; // @phpstan-ignore-line // @phpstan-ignore-line // @phpstan-ignore-line @@ -62,6 +63,7 @@ class AvailableBudgetEnrichment implements EnrichmentInterface // @phpstan-ignore-line // @phpstan-ignore-line // @phpstan-ignore-line + // @phpstan-ignore-line private array $currencies = []; private array $currencyIds = []; private array $ids = []; diff --git a/app/Support/JsonApi/Enrichments/BudgetLimitEnrichment.php b/app/Support/JsonApi/Enrichments/BudgetLimitEnrichment.php index dc0d9556a9..7e74aafc79 100644 --- a/app/Support/JsonApi/Enrichments/BudgetLimitEnrichment.php +++ b/app/Support/JsonApi/Enrichments/BudgetLimitEnrichment.php @@ -51,6 +51,7 @@ class BudgetLimitEnrichment implements EnrichmentInterface // @phpstan-ignore-line // @phpstan-ignore-line // @phpstan-ignore-line + // @phpstan-ignore-line private array $currencies = []; private array $currencyIds = []; private Carbon $end; diff --git a/app/Support/JsonApi/Enrichments/PiggyBankEnrichment.php b/app/Support/JsonApi/Enrichments/PiggyBankEnrichment.php index a0dea2a432..764eb20f1a 100644 --- a/app/Support/JsonApi/Enrichments/PiggyBankEnrichment.php +++ b/app/Support/JsonApi/Enrichments/PiggyBankEnrichment.php @@ -53,6 +53,7 @@ class PiggyBankEnrichment implements EnrichmentInterface // @phpstan-ignore-line // @phpstan-ignore-line // @phpstan-ignore-line + // @phpstan-ignore-line private array $accounts = []; // @phpstan-ignore-line // @phpstan-ignore-line // @phpstan-ignore-line @@ -64,6 +65,7 @@ class PiggyBankEnrichment implements EnrichmentInterface // @phpstan-ignore-line // @phpstan-ignore-line // @phpstan-ignore-line + // @phpstan-ignore-line private array $amounts = []; private Collection $collection; private array $currencies = []; diff --git a/app/Support/JsonApi/Enrichments/PiggyBankEventEnrichment.php b/app/Support/JsonApi/Enrichments/PiggyBankEventEnrichment.php index ae5f670c3c..718db946be 100644 --- a/app/Support/JsonApi/Enrichments/PiggyBankEventEnrichment.php +++ b/app/Support/JsonApi/Enrichments/PiggyBankEventEnrichment.php @@ -48,6 +48,7 @@ class PiggyBankEventEnrichment implements EnrichmentInterface // @phpstan-ignore-line // @phpstan-ignore-line // @phpstan-ignore-line + // @phpstan-ignore-line private array $accountIds = []; // @phpstan-ignore-line // @phpstan-ignore-line // @phpstan-ignore-line @@ -59,6 +60,7 @@ class PiggyBankEventEnrichment implements EnrichmentInterface // @phpstan-ignore-line // @phpstan-ignore-line // @phpstan-ignore-line + // @phpstan-ignore-line private Collection $collection; private array $currencies = []; private array $groupIds = []; diff --git a/app/Support/JsonApi/Enrichments/SubscriptionEnrichment.php b/app/Support/JsonApi/Enrichments/SubscriptionEnrichment.php index 64630e123d..894b99b7de 100644 --- a/app/Support/JsonApi/Enrichments/SubscriptionEnrichment.php +++ b/app/Support/JsonApi/Enrichments/SubscriptionEnrichment.php @@ -57,6 +57,7 @@ class SubscriptionEnrichment implements EnrichmentInterface // @phpstan-ignore-line // @phpstan-ignore-line // @phpstan-ignore-line + // @phpstan-ignore-line private readonly bool $convertToPrimary; private ?Carbon $end = null; private array $mappedObjects = []; diff --git a/app/Support/JsonApi/Enrichments/TransactionGroupEnrichment.php b/app/Support/JsonApi/Enrichments/TransactionGroupEnrichment.php index 474ac3ed40..7f72da165d 100644 --- a/app/Support/JsonApi/Enrichments/TransactionGroupEnrichment.php +++ b/app/Support/JsonApi/Enrichments/TransactionGroupEnrichment.php @@ -75,6 +75,8 @@ class TransactionGroupEnrichment implements EnrichmentInterface // @phpstan-ignore-line + // @phpstan-ignore-line + public function __construct() { $this->dateFields = ['interest_date', 'book_date', 'process_date', 'due_date', 'payment_date', 'invoice_date']; diff --git a/app/Support/JsonApi/Enrichments/WebhookEnrichment.php b/app/Support/JsonApi/Enrichments/WebhookEnrichment.php index f4a8bdcd32..842e113b9b 100644 --- a/app/Support/JsonApi/Enrichments/WebhookEnrichment.php +++ b/app/Support/JsonApi/Enrichments/WebhookEnrichment.php @@ -53,6 +53,7 @@ class WebhookEnrichment implements EnrichmentInterface // @phpstan-ignore-line // @phpstan-ignore-line // @phpstan-ignore-line + // @phpstan-ignore-line private array $ids = []; // @phpstan-ignore-line // @phpstan-ignore-line // @phpstan-ignore-line @@ -64,6 +65,7 @@ class WebhookEnrichment implements EnrichmentInterface // @phpstan-ignore-line // @phpstan-ignore-line // @phpstan-ignore-line + // @phpstan-ignore-line private array $responses = []; private array $triggers = []; private array $webhookDeliveries = []; diff --git a/composer.lock b/composer.lock index fad91505a9..20e8114cc9 100644 --- a/composer.lock +++ b/composer.lock @@ -11908,16 +11908,16 @@ }, { "name": "phpunit/phpunit", - "version": "12.5.10", + "version": "12.5.11", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "1686e30f6b32d35592f878a7f56fd0421d7d56c5" + "reference": "9b518cb40f9474572c9f0178e96ff3dc1cf02bf1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1686e30f6b32d35592f878a7f56fd0421d7d56c5", - "reference": "1686e30f6b32d35592f878a7f56fd0421d7d56c5", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9b518cb40f9474572c9f0178e96ff3dc1cf02bf1", + "reference": "9b518cb40f9474572c9f0178e96ff3dc1cf02bf1", "shasum": "" }, "require": { @@ -11986,7 +11986,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/12.5.10" + "source": "https://github.com/sebastianbergmann/phpunit/tree/12.5.11" }, "funding": [ { @@ -12010,7 +12010,7 @@ "type": "tidelift" } ], - "time": "2026-02-08T07:06:48+00:00" + "time": "2026-02-10T12:32:02+00:00" }, { "name": "rector/rector", @@ -13215,5 +13215,5 @@ "platform-overrides": { "php": "8.4" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" } diff --git a/config/firefly.php b/config/firefly.php index de9f8d35c9..ebfb45d287 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -78,8 +78,8 @@ return [ 'running_balance_column' => (bool)envNonEmpty('USE_RUNNING_BALANCE', true), // this is only the default value, is not used. // see cer.php for exchange rates feature flag. ], - 'version' => 'develop/2026-02-09', - 'build_time' => 1770609314, + 'version' => 'develop/2026-02-10', + 'build_time' => 1770727063, 'api_version' => '2.1.0', // field is no longer used. 'db_version' => 28, // field is no longer used. diff --git a/package-lock.json b/package-lock.json index 393f9473c7..5986ad9407 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3364,42 +3364,42 @@ } }, "node_modules/@vue/compiler-core": { - "version": "3.5.27", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.27.tgz", - "integrity": "sha512-gnSBQjZA+//qDZen+6a2EdHqJ68Z7uybrMf3SPjEGgG4dicklwDVmMC1AeIHxtLVPT7sn6sH1KOO+tS6gwOUeQ==", + "version": "3.5.28", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.28.tgz", + "integrity": "sha512-kviccYxTgoE8n6OCw96BNdYlBg2GOWfBuOW4Vqwrt7mSKWKwFVvI8egdTltqRgITGPsTFYtKYfxIG8ptX2PJHQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.28.5", - "@vue/shared": "3.5.27", - "entities": "^7.0.0", + "@babel/parser": "^7.29.0", + "@vue/shared": "3.5.28", + "entities": "^7.0.1", "estree-walker": "^2.0.2", "source-map-js": "^1.2.1" } }, "node_modules/@vue/compiler-dom": { - "version": "3.5.27", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.27.tgz", - "integrity": "sha512-oAFea8dZgCtVVVTEC7fv3T5CbZW9BxpFzGGxC79xakTr6ooeEqmRuvQydIiDAkglZEAd09LgVf1RoDnL54fu5w==", + "version": "3.5.28", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.28.tgz", + "integrity": "sha512-/1ZepxAb159jKR1btkefDP+J2xuWL5V3WtleRmxaT+K2Aqiek/Ab/+Ebrw2pPj0sdHO8ViAyyJWfhXXOP/+LQA==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-core": "3.5.27", - "@vue/shared": "3.5.27" + "@vue/compiler-core": "3.5.28", + "@vue/shared": "3.5.28" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.5.27", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.27.tgz", - "integrity": "sha512-sHZu9QyDPeDmN/MRoshhggVOWE5WlGFStKFwu8G52swATgSny27hJRWteKDSUUzUH+wp+bmeNbhJnEAel/auUQ==", + "version": "3.5.28", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.28.tgz", + "integrity": "sha512-6TnKMiNkd6u6VeVDhZn/07KhEZuBSn43Wd2No5zaP5s3xm8IqFTHBj84HJah4UepSUJTro5SoqqlOY22FKY96g==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.28.5", - "@vue/compiler-core": "3.5.27", - "@vue/compiler-dom": "3.5.27", - "@vue/compiler-ssr": "3.5.27", - "@vue/shared": "3.5.27", + "@babel/parser": "^7.29.0", + "@vue/compiler-core": "3.5.28", + "@vue/compiler-dom": "3.5.28", + "@vue/compiler-ssr": "3.5.28", + "@vue/shared": "3.5.28", "estree-walker": "^2.0.2", "magic-string": "^0.30.21", "postcss": "^8.5.6", @@ -3407,14 +3407,14 @@ } }, "node_modules/@vue/compiler-ssr": { - "version": "3.5.27", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.27.tgz", - "integrity": "sha512-Sj7h+JHt512fV1cTxKlYhg7qxBvack+BGncSpH+8vnN+KN95iPIcqB5rsbblX40XorP+ilO7VIKlkuu3Xq2vjw==", + "version": "3.5.28", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.28.tgz", + "integrity": "sha512-JCq//9w1qmC6UGLWJX7RXzrGpKkroubey/ZFqTpvEIDJEKGgntuDMqkuWiZvzTzTA5h2qZvFBFHY7fAAa9475g==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-dom": "3.5.27", - "@vue/shared": "3.5.27" + "@vue/compiler-dom": "3.5.28", + "@vue/shared": "3.5.28" } }, "node_modules/@vue/component-compiler-utils": { @@ -3496,9 +3496,9 @@ "license": "MIT" }, "node_modules/@vue/shared": { - "version": "3.5.27", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.27.tgz", - "integrity": "sha512-dXr/3CgqXsJkZ0n9F3I4elY8wM9jMJpP3pvRG52r6m0tu/MsAFIe6JpXVGeNMd/D9F4hQynWT8Rfuj0bdm9kFQ==", + "version": "3.5.28", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.28.tgz", + "integrity": "sha512-cfWa1fCGBxrvaHRhvV3Is0MgmrbSCxYTXCSCau2I0a1Xw1N1pHAvkWCiXPRAqjvToILvguNyEwjevUqAuBQWvQ==", "dev": true, "license": "MIT" },