Various code cleanup.

This commit is contained in:
James Cole
2018-07-26 06:10:17 +02:00
parent e8c9554dd6
commit 6bcfea1de4
37 changed files with 351 additions and 185 deletions

View File

@@ -124,8 +124,8 @@ class PiggyBankTransformer extends TransformerAbstract
$accountRepos = app(AccountRepositoryInterface::class);
$accountRepos->setUser($account->user);
$currencyId = (int)$accountRepos->getMetaValue($account, 'currency_id');
if ($currencyId === 0) {
$currency = null;
if (0 === $currencyId) {
$currency = app('amount')->getDefaultCurrencyByUser($account->user);
}