mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-16 14:48:11 +00:00
Various code cleanup.
This commit is contained in:
@@ -99,6 +99,7 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function delete(TransactionJournal $journal): bool
|
||||
@@ -180,7 +181,7 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
{
|
||||
/** @var Transaction $transaction */
|
||||
foreach ($journal->transactions as $transaction) {
|
||||
if ($transaction->account->accountType->type === AccountType::ASSET) {
|
||||
if (AccountType::ASSET === $transaction->account->accountType->type) {
|
||||
return $transaction;
|
||||
}
|
||||
}
|
||||
@@ -274,6 +275,7 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
* @param array $data
|
||||
*
|
||||
* @return TransactionJournal
|
||||
*
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
*/
|
||||
@@ -361,6 +363,7 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
* @param array $data
|
||||
*
|
||||
* @return TransactionJournal
|
||||
*
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
@@ -418,7 +421,6 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
return $journal;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Same as above but for transaction journal with multiple transactions.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user