Various code cleanup and fixed alignments.

This commit is contained in:
James Cole
2024-01-01 14:43:56 +01:00
parent 1368aafe5f
commit f963ac63f1
443 changed files with 3668 additions and 3672 deletions

View File

@@ -37,7 +37,7 @@ trait TransferValidation
$accountIban = array_key_exists('iban', $array) ? $array['iban'] : null;
app('log')->debug('Now in validateTransferDestination', $array);
// source can be any of the following types.
$validTypes = $this->combinations[$this->transactionType][$this->source->accountType->type] ?? [];
$validTypes = $this->combinations[$this->transactionType][$this->source->accountType->type] ?? [];
if (null === $accountId && null === $accountName && null === $accountIban && false === $this->canCreateTypes($validTypes)) {
// if both values are NULL we return false,
// because the destination of a transfer can't be created.
@@ -48,7 +48,7 @@ trait TransferValidation
}
// or try to find the account:
$search = $this->findExistingAccount($validTypes, $array);
$search = $this->findExistingAccount($validTypes, $array);
if (null === $search) {
$this->destError = (string)trans('validation.transfer_dest_bad_data', ['id' => $accountId, 'name' => $accountName]);
@@ -79,7 +79,7 @@ trait TransferValidation
$accountNumber = array_key_exists('number', $array) ? $array['number'] : null;
app('log')->debug('Now in validateTransferSource', $array);
// source can be any of the following types.
$validTypes = array_keys($this->combinations[$this->transactionType]);
$validTypes = array_keys($this->combinations[$this->transactionType]);
if (null === $accountId && null === $accountName
&& null === $accountIban && null === $accountNumber
&& false === $this->canCreateTypes($validTypes)) {
@@ -92,7 +92,7 @@ trait TransferValidation
}
// otherwise try to find the account:
$search = $this->findExistingAccount($validTypes, $array);
$search = $this->findExistingAccount($validTypes, $array);
if (null === $search) {
$this->sourceError = (string)trans('validation.transfer_source_bad_data', ['id' => $accountId, 'name' => $accountName]);
app('log')->warning('Not a valid source, cant find it.', $validTypes);