From 085eb650e7cc463dfa756587dbd25fee18d5d891 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 21 Feb 2018 20:34:48 +0100 Subject: [PATCH] Code cleanup. --- app/Services/Internal/Update/AccountUpdateService.php | 3 --- app/Services/Internal/Update/TransactionUpdateService.php | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/Services/Internal/Update/AccountUpdateService.php b/app/Services/Internal/Update/AccountUpdateService.php index 18cfd461c2..1035cad10d 100644 --- a/app/Services/Internal/Update/AccountUpdateService.php +++ b/app/Services/Internal/Update/AccountUpdateService.php @@ -29,8 +29,6 @@ use FireflyIII\Factory\AccountMetaFactory; use FireflyIII\Models\Account; use FireflyIII\Models\AccountMeta; use FireflyIII\Models\AccountType; -use FireflyIII\Models\Transaction; -use FireflyIII\Models\TransactionJournal; use FireflyIII\Services\Internal\Support\AccountServiceTrait; use Log; @@ -128,5 +126,4 @@ class AccountUpdateService } - } \ No newline at end of file diff --git a/app/Services/Internal/Update/TransactionUpdateService.php b/app/Services/Internal/Update/TransactionUpdateService.php index f7ccc2ca54..d6685feb1f 100644 --- a/app/Services/Internal/Update/TransactionUpdateService.php +++ b/app/Services/Internal/Update/TransactionUpdateService.php @@ -311,7 +311,7 @@ class TransactionUpdateService * TODO method is duplicated * * @param Transaction $transaction - * @param string|null $amount + * @param string|null $amount */ protected function setForeignAmount(Transaction $transaction, ?string $amount): void { @@ -330,6 +330,7 @@ class TransactionUpdateService if (is_null($currency)) { $transaction->foreign_currency_id = null; $transaction->save(); + return; } $transaction->foreign_currency_id = $currency->id;