Fix phpstan issues.

This commit is contained in:
James Cole
2023-11-05 16:55:16 +01:00
parent 4edd9fe3da
commit a0564751d6
72 changed files with 110 additions and 138 deletions

View File

@@ -137,7 +137,7 @@ trait AccountServiceTrait
$data['account_role'] = '';
}
if ($account->accountType->type === AccountType::ASSET && array_key_exists('account_role', $data) && 'ccAsset' === $data['account_role']) {
if ($account->accountType->type === AccountType::ASSET && 'ccAsset' === $data['account_role']) {
$fields = $this->validCCFields;
}
/** @var AccountMetaFactory $factory */

View File

@@ -461,10 +461,8 @@ trait JournalServiceTrait
return;
}
if ('' === $notes && null !== $note) {
// try to delete existing notes.
$note->delete();
}
// try to delete existing notes.
$note?->delete();
}
/**