Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix various phpstan issues.
James Cole959d1683521a
diff --git a/.ci/phpstan.neon b/.ci/phpstan.neonindex e4ccccdcf6..e9308c084c 100644--- a/.ci/phpstan.neon+++ b/.ci/phpstan.neon@@ -67,5 +67,5 @@ parameters:# The level 8 is the highest level. original was 5# 7 is more than enough, higher just leaves NULL things.- level: 2+ level: 3diff --git a/app/Services/Internal/Update/RecurrenceUpdateService.php b/app/Services/Internal/Update/RecurrenceUpdateService.phpindex 60598355f7..bd47aefbc8 100644--- a/app/Services/Internal/Update/RecurrenceUpdateService.php+++ b/app/Services/Internal/Update/RecurrenceUpdateService.php@@ -169,7 +169,7 @@ class RecurrenceUpdateServiceif (1 === $originalCount) {app('log')->debug('Return the first one');- // @var RecurrenceRepetition|null+ /** @var RecurrenceRepetition|null */return $recurrence->recurrenceRepetitions()->first();}// find it:@@ -187,7 +187,7 @@ class RecurrenceUpdateService}}- // @var RecurrenceRepetition|null+ /** @var RecurrenceRepetition|null */return $query->first();}diff --git a/app/Support/Amount.php b/app/Support/Amount.phpindex 754cd37161..7f3d33ee85 100644--- a/app/Support/Amount.php+++ b/app/Support/Amount.php@@ -175,6 +175,7 @@ class Amountif ($cache->has()) {return $cache->get();}+ /** @var TransactionCurrency $default */$default = $userGroup->currencies()->where('group_default', true)->first();if (null === $default) {$default = $this->getSystemCurrency();diff --git a/app/Transformers/TransactionGroupTransformer.php b/app/Transformers/TransactionGroupTransformer.phpindex 2683727631..3fbe4773a6 100644--- a/app/Transformers/TransactionGroupTransformer.php+++ b/app/Transformers/TransactionGroupTransformer.php@@ -247,6 +247,7 @@ class TransactionGroupTransformer extends AbstractTransformerprivate function getLocation(TransactionJournal $journal): ?Location{+ /** @var Location|null */return $journal->locations()->first();}