Skip to content

Firefly III: a personal finances manager

Code cleanup.

James Cole085eb650e7cc
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;