Followed up on some inspections.

This commit is contained in:
James Cole
2016-01-01 21:49:27 +01:00
parent 5eb0e18cae
commit e892c9a824
32 changed files with 374 additions and 571 deletions

View File

@@ -53,6 +53,7 @@ class AccountController extends Controller
$cache->addProperty('all');
$cache->addProperty('accounts');
$cache->addProperty('default');
$cache->addProperty($reportType);
$cache->addProperty($accounts);
if ($cache->has()) {
return Response::json($cache->get()); // @codeCoverageIgnore

View File

@@ -49,6 +49,7 @@ class ReportController extends Controller
$cache = new CacheProperties;
$cache->addProperty('yearInOut');
$cache->addProperty($start);
$cache->addProperty($reportType);
$cache->addProperty($accounts);
$cache->addProperty($end);
if ($cache->has()) {
@@ -115,6 +116,7 @@ class ReportController extends Controller
$cache->addProperty('yearInOutSummarized');
$cache->addProperty($start);
$cache->addProperty($end);
$cache->addProperty($reportType);
$cache->addProperty($accounts);
if ($cache->has()) {
return Response::json($cache->get()); // @codeCoverageIgnore

View File

@@ -146,7 +146,7 @@ class CsvController extends Controller
*
* STEP ONE
*
* @param AccountRepositoryInterface $repository
* @param ARI $repository
*
* @return \Illuminate\View\View
*/

View File

@@ -157,7 +157,7 @@ class PiggyBankController extends Controller
}
/**
* @param AccountRepositoryInterface $repository
* @param ARI $repository
* @param PiggyBankRepositoryInterface $piggyRepository
*
* @return View

View File

@@ -54,8 +54,9 @@ class Authenticate
return redirect()->guest('auth/login');
}
}
if ($this->auth->user() instanceof User && intval($this->auth->user()->blocked) == 1) {
/** @var User $user */
$user = $this->auth->user();
if ($user instanceof User && intval($user->blocked) == 1) {
Auth::logout();
return redirect()->route('index');

View File

@@ -355,9 +355,9 @@ Breadcrumbs::register(
$breadcrumbs->parent('reports.index');
$monthFormat = trans('config.month_and_day');
$title = trans('firefly.report_default', ['start' => $start->formatLocalized($monthFormat), 'end' => $end->formatLocalized($monthFormat)]);
$title = trans('firefly.report_' . $reportType, ['start' => $start->formatLocalized($monthFormat), 'end' => $end->formatLocalized($monthFormat)]);
$breadcrumbs->push($title, route('reports.report', ['url' => 'abcde']));
$breadcrumbs->push($title, route('reports.report', [$reportType, $start->format('Ymd'), $end->format('Ymd'), join(',', $accountIds)]));
}
);