mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Reformat various code.
This commit is contained in:
@@ -40,7 +40,7 @@ trait WithdrawalValidation
|
||||
abstract protected function canCreateTypes(array $accountTypes): bool;
|
||||
|
||||
/**
|
||||
* @param array $validTypes
|
||||
* @param array $validTypes
|
||||
* @param array $data
|
||||
*
|
||||
* @return Account|null
|
||||
@@ -62,7 +62,7 @@ trait WithdrawalValidation
|
||||
if (null === $accountId && null === $accountName && false === $this->canCreateTypes($validTypes)) {
|
||||
// if both values are NULL we return TRUE
|
||||
// because we assume the user doesnt want to submit / change anything.
|
||||
$this->sourceError = (string)trans('validation.withdrawal_source_need_data');
|
||||
$this->sourceError = (string) trans('validation.withdrawal_source_need_data');
|
||||
Log::warning('[a] Not a valid source. Need more data.');
|
||||
|
||||
return false;
|
||||
@@ -71,7 +71,7 @@ trait WithdrawalValidation
|
||||
// otherwise try to find the account:
|
||||
$search = $this->findExistingAccount($validTypes, $array);
|
||||
if (null === $search) {
|
||||
$this->sourceError = (string)trans('validation.withdrawal_source_bad_data', ['id' => $accountId, 'name' => $accountName]);
|
||||
$this->sourceError = (string) trans('validation.withdrawal_source_bad_data', ['id' => $accountId, 'name' => $accountName]);
|
||||
Log::warning('Not a valid source. Cant find it.', $validTypes);
|
||||
|
||||
return false;
|
||||
@@ -97,7 +97,7 @@ trait WithdrawalValidation
|
||||
if (null === $accountId && null === $accountName && false === $this->canCreateTypes($validTypes)) {
|
||||
// if both values are NULL return false,
|
||||
// because the destination of a withdrawal can never be created automatically.
|
||||
$this->destError = (string)trans('validation.withdrawal_dest_need_data');
|
||||
$this->destError = (string) trans('validation.withdrawal_dest_need_data');
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -110,7 +110,7 @@ trait WithdrawalValidation
|
||||
if (in_array($type, $validTypes, true)) {
|
||||
return true;
|
||||
}
|
||||
$this->destError = (string)trans('validation.withdrawal_dest_bad_data', ['id' => $accountId, 'name' => $accountName]);
|
||||
$this->destError = (string) trans('validation.withdrawal_dest_bad_data', ['id' => $accountId, 'name' => $accountName]);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -136,7 +136,7 @@ trait WithdrawalValidation
|
||||
if (null === $accountId && null === $accountName && false === $this->canCreateTypes($validTypes)) {
|
||||
// if both values are NULL we return false,
|
||||
// because the source of a withdrawal can't be created.
|
||||
$this->sourceError = (string)trans('validation.withdrawal_source_need_data');
|
||||
$this->sourceError = (string) trans('validation.withdrawal_source_need_data');
|
||||
Log::warning('[b] Not a valid source. Need more data.');
|
||||
|
||||
return false;
|
||||
@@ -145,7 +145,7 @@ trait WithdrawalValidation
|
||||
// otherwise try to find the account:
|
||||
$search = $this->findExistingAccount($validTypes, $array);
|
||||
if (null === $search) {
|
||||
$this->sourceError = (string)trans('validation.withdrawal_source_bad_data', ['id' => $accountId, 'name' => $accountName]);
|
||||
$this->sourceError = (string) trans('validation.withdrawal_source_bad_data', ['id' => $accountId, 'name' => $accountName]);
|
||||
Log::warning('Not a valid source. Cant find it.', $validTypes);
|
||||
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user