Various PSR12 code cleanup

This commit is contained in:
James Cole
2022-12-29 19:42:26 +01:00
parent dbf3e76ecc
commit 6cfdc58cb1
415 changed files with 7462 additions and 6874 deletions

View File

@@ -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)];
}