chore: fix various qodana issues

This commit is contained in:
James Cole
2023-06-04 06:30:22 +02:00
parent 160c364d2a
commit 688ca8e374
20 changed files with 56 additions and 106 deletions

View File

@@ -107,6 +107,7 @@ class AccountFactory
Log::debug(sprintf('Now in AccountFactory::find("%s", "%s")', $accountName, $accountType));
$type = AccountType::whereType($accountType)->first();
/** @var Account|null */
return $this->user->accounts()->where('account_type_id', $type->id)->where('name', $accountName)->first();
}
@@ -294,7 +295,7 @@ class AccountFactory
*
* @throws FireflyException
*/
private function storeCreditLiability(Account $account, array $data)
private function storeCreditLiability(Account $account, array $data): void
{
Log::debug('storeCreditLiability');
$account->refresh();
@@ -366,7 +367,7 @@ class AccountFactory
*
* @throws FireflyException
*/
private function storeOpeningBalance(Account $account, array $data)
private function storeOpeningBalance(Account $account, array $data): void
{
$accountType = $account->accountType->type;