Final nestor and phpstan fixes.

This commit is contained in:
James Cole
2025-09-07 17:42:16 +02:00
parent f5c202543c
commit 81cd89d66f
47 changed files with 59 additions and 128 deletions

View File

@@ -53,7 +53,7 @@ class PiggyBankEnrichment implements EnrichmentInterface
// private array $accountCurrencies = [];
private array $notes = [];
private array $mappedObjects = [];
private TransactionCurrency $primaryCurrency;
private readonly TransactionCurrency $primaryCurrency;
private array $amounts = [];
private array $accounts = [];
private array $objectGroups = [];
@@ -271,7 +271,7 @@ class PiggyBankEnrichment implements EnrichmentInterface
*/
private function getSuggestedMonthlyAmount(?Carbon $startDate, ?Carbon $targetDate, ?string $targetAmount, string $currentAmount): string
{
if (null === $targetAmount || null === $targetDate || null === $startDate) {
if (null === $targetAmount || !$targetDate instanceof Carbon || !$startDate instanceof Carbon) {
return '0';
}
$savePerMonth = '0';