Code reordering and reformatting. I should really start employing style CI.

This commit is contained in:
James Cole
2021-09-18 10:26:12 +02:00
parent 9b9d52e99f
commit 4003cea759
344 changed files with 2776 additions and 2605 deletions

View File

@@ -35,31 +35,6 @@ use Log;
trait LiabilityValidation
{
/**
* Source of an liability credit must be a liability.
*
* @param string|null $accountName
*
* @return bool
*/
protected function validateLCSource(?string $accountName): bool
{
$result = true;
Log::debug(sprintf('Now in validateLCDestination("%s")', $accountName));
if ('' === $accountName || null === $accountName) {
$result = false;
}
if (true === $result) {
// set the source to be a (dummy) revenue account.
$account = new Account;
$accountType = AccountType::whereType(AccountType::LIABILITY_CREDIT)->first();
$account->accountType = $accountType;
$this->source = $account;
}
return $result;
}
/**
* @param int|null $accountId
*
@@ -96,4 +71,29 @@ trait LiabilityValidation
return $result ?? false;
}
/**
* Source of an liability credit must be a liability.
*
* @param string|null $accountName
*
* @return bool
*/
protected function validateLCSource(?string $accountName): bool
{
$result = true;
Log::debug(sprintf('Now in validateLCDestination("%s")', $accountName));
if ('' === $accountName || null === $accountName) {
$result = false;
}
if (true === $result) {
// set the source to be a (dummy) revenue account.
$account = new Account;
$accountType = AccountType::whereType(AccountType::LIABILITY_CREDIT)->first();
$account->accountType = $accountType;
$this->source = $account;
}
return $result;
}
}