Various code cleanup.

This commit is contained in:
James Cole
2018-02-09 19:11:55 +01:00
parent ac98822a55
commit 95648c37b3
30 changed files with 142 additions and 256 deletions

View File

@@ -290,9 +290,6 @@ class AccountController extends Controller
if (AccountType::INITIAL_BALANCE === $account->accountType->type) {
return $this->redirectToOriginalAccount($account);
}
if ($end < $start) {
throw new FireflyException('End is after start!');
}
$range = Preferences::get('viewRange', '1M')->data;
if (null === $start) {
$start = session('start');
@@ -300,6 +297,9 @@ class AccountController extends Controller
if (null === $end) {
$end = app('navigation')->endOfPeriod($start, $range);
}
if ($end < $start) {
throw new FireflyException('End is after start!');
}
$subTitleIcon = config('firefly.subIconsByIdentifier.' . $account->accountType->type);
$page = intval($request->get('page'));