Some light refactoring. No changes.

This commit is contained in:
James Cole
2018-01-25 18:41:27 +01:00
parent 53fc4f2740
commit 7c70732247
28 changed files with 76 additions and 133 deletions

View File

@@ -190,7 +190,7 @@ class CategoryController extends Controller
$end = new Carbon;
}
// prep for "specific date" view.$dates = app('navigation')->blockPeriods($start, $end, $range);
// prep for "specific date" view.
if (strlen($moment) > 0 && 'all' !== $moment) {
$start = app('navigation')->startOfPeriod(new Carbon($moment), $range);
$end = app('navigation')->endOfPeriod($start, $range);

View File

@@ -105,7 +105,7 @@ class StatusController extends Controller
}
if ($tagId === 0) {
$result['finishedText'] = trans('import.status_finished_no_tag');
$result['finishedText'] = trans('import.status_finished_no_tag'); // @codeCoverageIgnore
}
}

View File

@@ -128,7 +128,7 @@ class PreferencesController extends Controller
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
* @SuppressWarnings(PHPMD.UnusedFormalParameter) // it's unused but the class does some validation.
*/
public function postCode(TokenFormRequest $request)
public function postCode(/** @scrutinizer ignore-unused */ TokenFormRequest $request)
{
Preferences::set('twoFactorAuthEnabled', 1);
Preferences::set('twoFactorAuthSecret', Session::get('two-factor-secret'));