Code cleanup for #595

This commit is contained in:
James Cole
2017-03-18 11:02:02 +01:00
parent 3215c4ee4b
commit 282ce041e1
14 changed files with 187 additions and 164 deletions

View File

@@ -307,8 +307,7 @@ class AccountController extends Controller
}
}
// fix title:
if ((strlen($moment) > 0 && $moment !== 'all') || strlen($moment) === 0) {
if ($moment != 'all' && $loop > 1) {
$subTitle = trans(
'firefly.journals_in_period_for_account', ['name' => $account->name, 'start' => $start->formatLocalized($this->monthAndDayFormat),
'end' => $end->formatLocalized($this->monthAndDayFormat)]
@@ -478,7 +477,7 @@ class AccountController extends Controller
$opposingTransaction = $journal->transactions()->where('transactions.id', '!=', $transaction->id)->first();
if (is_null($opposingTransaction)) {
throw new FireflyException('Expected an opposing transaction. This account has none. BEEP, error.');
throw new FireflyException('Expected an opposing transaction. This account has none. BEEP, error.'); // @codeCoverageIgnore
}
return redirect(route('accounts.show', [$opposingTransaction->account_id]));