mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Some code cleanup.
This commit is contained in:
@@ -25,6 +25,8 @@ use Steam;
|
||||
|
||||
|
||||
/**
|
||||
* @SuppressWarnings(PHPMD.TooManyMethods)
|
||||
*
|
||||
* Class AccountRepository
|
||||
*
|
||||
* @package FireflyIII\Repositories\Account
|
||||
@@ -306,7 +308,8 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
if ($journal->destination_account->id == $account->id) {
|
||||
return $journal;
|
||||
}
|
||||
} // @codeCoverageIgnore
|
||||
return null;
|
||||
}
|
||||
);
|
||||
|
||||
return $filtered;
|
||||
@@ -398,7 +401,6 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
|
||||
// update meta data:
|
||||
$this->updateMetadata($account, $data);
|
||||
|
||||
$openingBalance = $this->openingBalanceTransaction($account);
|
||||
|
||||
// if has openingbalance?
|
||||
@@ -421,10 +423,8 @@ class AccountRepository implements AccountRepositoryInterface
|
||||
}
|
||||
|
||||
} else {
|
||||
// opening balance is zero, should we delete it?
|
||||
if ($openingBalance) {
|
||||
// delete existing opening balance.
|
||||
$openingBalance->delete();
|
||||
if ($openingBalance) { // opening balance is zero, should we delete it?
|
||||
$openingBalance->delete();// delete existing opening balance.
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user