Update various things. I know, great description.

This commit is contained in:
James Cole
2023-11-30 17:28:44 +01:00
parent 627db2c2df
commit 271e4271eb
100 changed files with 488 additions and 409 deletions

View File

@@ -127,7 +127,7 @@ trait DepositValidation
// if there is an iban, it can only be in use by a valid source type, or we will fail.
if (null !== $accountIban && '' !== $accountIban) {
app('log')->debug('Check if there is not already an account with this IBAN');
app('log')->debug('Check if there is not already another account with this IBAN');
$existing = $this->findExistingAccount($validTypes, ['iban' => $accountIban], true);
if (null !== $existing) {
$this->sourceError = (string)trans('validation.deposit_src_iban_exists');

View File

@@ -265,6 +265,7 @@ class AccountValidator
* @param bool $inverse
*
* @return Account|null
* @SuppressWarnings(PHPMD.BooleanArgumentFlag)
*/
protected function findExistingAccount(array $validTypes, array $data, bool $inverse = false): ?Account
{

View File

@@ -563,7 +563,7 @@ trait TransactionValidation
return;
}
$transactions = $this->getTransactionsArray($validator);
foreach ($transactions as $key => $value) {
foreach (array_keys($transactions) as $key) {
if (!is_int($key)) {
$validator->errors()->add('transactions.0.description', (string)trans('validation.at_least_one_transaction'));
app('log')->debug('Added error: at_least_one_transaction.');