mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 17:33:45 +00:00
Code reordering and reformatting. I should really start employing style CI.
This commit is contained in:
@@ -30,11 +30,11 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\User;
|
||||
use FireflyIII\Validation\Account\AccountValidatorProperties;
|
||||
use FireflyIII\Validation\Account\DepositValidation;
|
||||
use FireflyIII\Validation\Account\LiabilityValidation;
|
||||
use FireflyIII\Validation\Account\OBValidation;
|
||||
use FireflyIII\Validation\Account\ReconciliationValidation;
|
||||
use FireflyIII\Validation\Account\TransferValidation;
|
||||
use FireflyIII\Validation\Account\WithdrawalValidation;
|
||||
use FireflyIII\Validation\Account\LiabilityValidation;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
@@ -202,21 +202,6 @@ class AccountValidator
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $accountType
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function canCreateType(string $accountType): bool
|
||||
{
|
||||
$canCreate = [AccountType::EXPENSE, AccountType::REVENUE, AccountType::INITIAL_BALANCE, AccountType::LIABILITY_CREDIT];
|
||||
if (in_array($accountType, $canCreate, true)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $validTypes
|
||||
* @param int $accountId
|
||||
@@ -242,4 +227,19 @@ class AccountValidator
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $accountType
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function canCreateType(string $accountType): bool
|
||||
{
|
||||
$canCreate = [AccountType::EXPENSE, AccountType::REVENUE, AccountType::INITIAL_BALANCE, AccountType::LIABILITY_CREDIT];
|
||||
if (in_array($accountType, $canCreate, true)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user