Code cleanup.

This commit is contained in:
James Cole
2017-11-22 21:12:27 +01:00
parent 4e6b782204
commit 781ca052d8
142 changed files with 213 additions and 859 deletions

View File

@@ -228,11 +228,12 @@ trait FindAccountsTrait
* @param Account $account
*
* @return Account|null
*
* @throws FireflyException
*/
public function getReconciliation(Account $account): ?Account
{
if ($account->accountType->type !== AccountType::ASSET) {
if (AccountType::ASSET !== $account->accountType->type) {
throw new FireflyException(sprintf('%s is not an asset account.', $account->name));
}
$name = $account->name . ' reconciliation';

View File

@@ -189,7 +189,7 @@ class JournalRepository implements JournalRepositoryInterface
->where('transaction_journals.user_id', $this->user->id)
->whereNull('transaction_journals.deleted_at')
->whereNull('transactions.deleted_at')
->get( ['transactions.*']);
->get(['transactions.*']);
return $set;
}

View File

@@ -35,15 +35,6 @@ use Illuminate\Support\MessageBag;
*/
interface JournalRepositoryInterface
{
/**
* @param array $transactionIds
*
* @return Collection
*/
public function getTransactionsById(array $transactionIds): Collection;
/**
* @param TransactionJournal $journal
* @param TransactionType $type
@@ -105,6 +96,13 @@ interface JournalRepositoryInterface
*/
public function getTransactionTypes(): Collection;
/**
* @param array $transactionIds
*
* @return Collection
*/
public function getTransactionsById(array $transactionIds): Collection;
/**
* @param TransactionJournal $journal
*