Refactor isSplitJournal()

This commit is contained in:
James Cole
2018-08-09 16:14:47 +02:00
parent 136f983353
commit 0c2093753d
2 changed files with 17 additions and 14 deletions

View File

@@ -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;
}
}