Skip to content

Firefly III: a personal finances manager

Fix null type issues.

James Cole19b548a417cb
diff --git a/app/Models/PiggyBankEvent.php b/app/Models/PiggyBankEvent.php
index 0b4212d7cb..5936a3231e 100644
--- a/app/Models/PiggyBankEvent.php
+++ b/app/Models/PiggyBankEvent.php
@@ -34,7 +34,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* @property Carbon $date
- * @property PiggyBank $piggyBank
+ * @property PiggyBank|null $piggyBank
*/
#[ObservedBy([PiggyBankEventObserver::class])]
class PiggyBankEvent extends Model
diff --git a/app/Validation/AccountValidator.php b/app/Validation/AccountValidator.php
index e55238c40f..d08842ac4f 100644
--- a/app/Validation/AccountValidator.php
+++ b/app/Validation/AccountValidator.php
@@ -90,7 +90,7 @@ class AccountValidator
Log::debug('AccountValidator source is set to NULL');
}
if ($account instanceof Account) {
- Log::debug(sprintf('AccountValidator source is set to #%d: "%s" (%s)', $account->id, $account->name, $account->accountType?->type));
+ Log::debug(sprintf('AccountValidator source is set to #%d: "%s" (%s)', $account->id, $account->name, $account->accountType->type));
}
$this->source = $account;
}