mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-08 03:21:20 +00:00
Various PSR12 code cleanup
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* AccountFormRequest.php
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
@@ -107,12 +108,12 @@ class AccountFormRequest extends FormRequest
|
||||
'virtual_balance' => 'numeric|nullable|max:1000000000',
|
||||
'currency_id' => 'exists:transaction_currencies,id',
|
||||
'account_number' => 'between:1,255|uniqueAccountNumberForUser|nullable',
|
||||
'account_role' => 'in:' . $accountRoles,
|
||||
'account_role' => 'in:'.$accountRoles,
|
||||
'active' => 'boolean',
|
||||
'cc_type' => 'in:' . $ccPaymentTypes,
|
||||
'cc_type' => 'in:'.$ccPaymentTypes,
|
||||
'amount_currency_id_opening_balance' => 'exists:transaction_currencies,id',
|
||||
'amount_currency_id_virtual_balance' => 'exists:transaction_currencies,id',
|
||||
'what' => 'in:' . $types,
|
||||
'what' => 'in:'.$types,
|
||||
'interest_period' => 'in:daily,monthly,yearly',
|
||||
];
|
||||
$rules = Location::requestRules($rules);
|
||||
@@ -122,7 +123,7 @@ class AccountFormRequest extends FormRequest
|
||||
if (null !== $account) {
|
||||
// add rules:
|
||||
$rules['id'] = 'belongsToUser:accounts';
|
||||
$rules['name'] = 'required|min:1|uniqueAccountForUser:' . $account->id;
|
||||
$rules['name'] = 'required|min:1|uniqueAccountForUser:'.$account->id;
|
||||
$rules['iban'] = ['iban', 'nullable', new UniqueIban($account, $account->accountType->type)];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user