First part of a large code cleanup commit.

This commit is contained in:
James Cole
2019-02-12 21:49:28 +01:00
parent b273af341c
commit e0d87aa11e
70 changed files with 336 additions and 354 deletions

View File

@@ -107,7 +107,7 @@ trait TransactionServiceTrait
return $repository->findByName($accountName, [AccountType::ASSET]);
}
// for revenue and expense:
if (\strlen($accountName) > 0) {
if ('' !== $accountName) {
/** @var AccountFactory $factory */
$factory = app(AccountFactory::class);
$factory->setUser($this->user);
@@ -218,7 +218,7 @@ trait TransactionServiceTrait
return;
}
// enable currency if not enabled:
if(false === $currency->enabled) {
if (false === $currency->enabled) {
$currency->enabled = true;
$currency->save();
}