Fix code quality with rector [skip ci]

This commit is contained in:
James Cole
2025-11-09 09:08:03 +01:00
parent d2610be790
commit 68183a0a0e
209 changed files with 1021 additions and 1248 deletions

View File

@@ -24,7 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Validation\AutoBudget;
use Illuminate\Validation\Validator;
use Illuminate\Contracts\Validation\Validator;
/**
* Trait ValidatesAutoBudgetRequest
@@ -40,10 +40,10 @@ trait ValidatesAutoBudgetRequest
$type = $data['auto_budget_type'] ?? '';
/** @var null|float|int|string $amount */
$amount = array_key_exists('auto_budget_amount', $data) ? $data['auto_budget_amount'] : null;
$period = array_key_exists('auto_budget_period', $data) ? $data['auto_budget_period'] : null;
$amount = $data['auto_budget_amount'] ?? null;
$period = $data['auto_budget_period'] ?? null;
$currencyId = array_key_exists('auto_budget_currency_id', $data) ? (int) $data['auto_budget_currency_id'] : null;
$currencyCode = array_key_exists('auto_budget_currency_code', $data) ? $data['auto_budget_currency_code'] : null;
$currencyCode = $data['auto_budget_currency_code'] ?? null;
if (is_numeric($type)) {
$type = (int) $type;
}