Code cleanup and realign.

This commit is contained in:
James Cole
2018-08-06 19:14:30 +02:00
parent f7eef25fed
commit 5908c0ce8c
188 changed files with 1019 additions and 1031 deletions

View File

@@ -338,13 +338,13 @@ trait TransactionValidation
if ($accountId < 1 && '' === $accountName) {
return null;
}
if ($accountId !== 0) {
if (0 !== $accountId) {
// ID belongs to user and is $type account:
/** @var AccountRepositoryInterface $repository */
$repository = app(AccountRepositoryInterface::class);
$repository->setUser($admin);
$set = $repository->getAccountsById([$accountId]);
if ($set->count() === 1) {
if (1 === $set->count()) {
/** @var Account $first */
$first = $set->first();
if ($first->accountType->type !== $type) {