mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-20 11:19:16 +00:00
Refactor isSplitJournal()
This commit is contained in:
@@ -445,18 +445,4 @@ class SingleController extends Controller
|
||||
// redirect to previous URL.
|
||||
return redirect($this->getPreviousUri('transactions.edit.uri'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if journal is split.
|
||||
*
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function isSplitJournal(TransactionJournal $journal): bool // validate objects
|
||||
{
|
||||
$count = $this->repository->countTransactions($journal);
|
||||
|
||||
return $count > 2;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user