Improve code quality and fix test coverage.

This commit is contained in:
James Cole
2018-04-28 10:27:33 +02:00
parent 7b39828980
commit e126427809
75 changed files with 430 additions and 369 deletions

View File

@@ -128,8 +128,8 @@ class TransactionController extends Controller
$page = (int)$request->get('page');
$pageSize = (int)Preferences::get('listPageSize', 50)->data;
$path = route('transactions.index.all', [$what]);
$first = $this->repository->first();
$start = $first->date ?? new Carbon;
$first = $this->repository->firstNull();
$start = null === $first ? new Carbon : $first->date;
$end = new Carbon;
$subTitle = trans('firefly.all_' . $what);