Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix code quality and CS fixer
James Cole9002365e6d3b
diff --git a/.ci/phpstan.neon b/.ci/phpstan.neonindex d46e730cf9..d72945c553 100644--- a/.ci/phpstan.neon+++ b/.ci/phpstan.neon@@ -4,8 +4,7 @@ parameters:reportUnmatchedIgnoredErrors: falsecheckGenericClassInNonGenericObjectType: false # remove this rule when all other issues are solved.ignoreErrors:- - '#Use value object over return of values#' # from simplify, ignore it.- - '#Use explicit names over dynamic ones#' # from simplify, ignore it.+ - '#Control structures using switch should not be used.#' # switch is fine insome cases.- '#Use unique name to make classes easy to recognize#'- '#Do not name "e", shorter than 2 chars#'- '#Do not name "q", shorter than 2 chars#'@@ -28,26 +27,7 @@ parameters:paths:- ../app/Support/Authentication/RemoteUserGuard.php-- message: '#Control structures using switch should not be used.#'- paths:- - ../app/Api/V1/Controllers/Data/DestroyController.php- - ../app/Console/Commands/Correction/FixAccountTypes.php- - ../app/Console/Commands/Upgrade/OtherCurrenciesCorrections.php- - ../app/Exceptions/GracefulNotFoundHandler.php- - ../app/Generator/Webhook/StandardMessageGenerator.php- - ../app/Support/Amount.php- - ../app/Support/Navigation.php- - ../app/Support/ParseDateString.php- - ../app/Support/Search/AccountSearch.php- - ../app/Support/Search/OperatorQuerySearch.php- - ../app/Support/Twig/General.php- - ../app/Transformers/RecurrenceTransformer.php- - ../app/Validation/AccountValidator.php- - ../app/Validation/RecurrenceValidation.php- - ../app/Validation/TransactionValidation.php-- -- message: '#Function compact\(\) should not be used#'+ message: '#Function compact\(\) should not be used#' # too useful in template rendering.paths:- ../app/Generator/Report/Account/MonthReportGenerator.php- ../app/Generator/Report/Audit/MonthReportGenerator.phpdiff --git a/app/Http/Controllers/Chart/ExpenseReportController.php b/app/Http/Controllers/Chart/ExpenseReportController.phpindex 310b6174d9..9f5b16b654 100644--- a/app/Http/Controllers/Chart/ExpenseReportController.php+++ b/app/Http/Controllers/Chart/ExpenseReportController.php@@ -147,7 +147,7 @@ class ExpenseReportController extends Controllerwhile ($currentStart < $end) {$currentEnd = clone $currentStart;- $currentEnd = $currentEnd->$function(); // @phpstan-ignore-line+ $currentEnd = $currentEnd->$function(); /** @phpstan-ignore-line */// get expenses grouped by opposing name:$expenses = $this->groupByName($this->getExpensesForOpposing($accounts, $all, $currentStart, $currentEnd));diff --git a/app/Repositories/Account/OperationsRepository.php b/app/Repositories/Account/OperationsRepository.phpindex 680d482416..d5c232951b 100644--- a/app/Repositories/Account/OperationsRepository.php+++ b/app/Repositories/Account/OperationsRepository.php@@ -268,7 +268,7 @@ class OperationsRepository implements OperationsRepositoryInterface'currency_code' => $journal['currency_code'],'currency_decimal_places' => $journal['currency_decimal_places'],];- $array[$currencyId]['sum'] = bcadd($array[$currencyId]['sum'], app('steam')->$direction($journal['amount']));// @phpstan-ignore-line+ $array[$currencyId]['sum'] = bcadd($array[$currencyId]['sum'], app('steam')->$direction($journal['amount']));/** @phpstan-ignore-line */// also do foreign amount:$foreignId = (int)$journal['foreign_currency_id'];