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

@@ -51,7 +51,7 @@ class AccountForm
*
* @return string
*/
public function activeDepositDestinations(string $name, $value = null, array $options = null): string
public function activeDepositDestinations(string $name, mixed $value = null, array $options = null): string
{
$types = [AccountType::MORTGAGE, AccountType::DEBT, AccountType::CREDITCARD, AccountType::LOAN, AccountType::REVENUE,];
$repository = $this->getAccountRepository();
@@ -72,7 +72,7 @@ class AccountForm
*
* @return string
*/
public function activeWithdrawalDestinations(string $name, $value = null, array $options = null): string
public function activeWithdrawalDestinations(string $name, mixed $value = null, array $options = null): string
{
$types = [AccountType::MORTGAGE, AccountType::DEBT, AccountType::CREDITCARD, AccountType::LOAN, AccountType::EXPENSE,];
$repository = $this->getAccountRepository();

View File

@@ -25,6 +25,7 @@ declare(strict_types=1);
namespace FireflyIII\Support\Search;
use FireflyIII\User;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Collection;
@@ -132,10 +133,13 @@ class AccountSearch implements GenericSearchInterface
}
/**
* @param User $user
* @param User|Authenticatable|null $user
* @return void
*/
public function setUser(User $user): void
public function setUser(User|Authenticatable|null $user): void
{
$this->user = $user;
if (null !== $user) {
$this->user = $user;
}
}
}