mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-10 12:24:50 +00:00
Code cleanup.
This commit is contained in:
@@ -133,4 +133,4 @@ class DomainController extends Controller
|
||||
|
||||
return $filtered;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,10 +28,12 @@ class UserController extends Controller
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function edit(User $user)
|
||||
{
|
||||
|
||||
return $user->id;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -45,8 +45,7 @@ class ImportController extends Controller
|
||||
*
|
||||
* @param ImportJob $job
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||
* @throws FireflyException
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|View
|
||||
*/
|
||||
public function complete(ImportJob $job)
|
||||
{
|
||||
@@ -54,7 +53,6 @@ class ImportController extends Controller
|
||||
if (!$this->jobInCorrectStep($job, 'complete')) {
|
||||
return $this->redirectToCorrectStep($job);
|
||||
}
|
||||
$importer = $this->makeImporter($job);
|
||||
$subTitle = trans('firefy.import_complete');
|
||||
$subTitleIcon = 'fa-star';
|
||||
|
||||
@@ -305,14 +303,11 @@ class ImportController extends Controller
|
||||
case 'configure':
|
||||
case 'process':
|
||||
return $job->status === 'import_status_never_started';
|
||||
break;
|
||||
case 'settings':
|
||||
case 'store-settings':
|
||||
return $job->status === 'import_configuration_saved';
|
||||
break;
|
||||
case 'complete':
|
||||
return $job->status === 'settings_complete';
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -230,4 +230,4 @@ class MassController extends Controller
|
||||
return redirect(session('transactions.mass-edit.url'));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -358,4 +358,4 @@ class SplitController extends Controller
|
||||
return $return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,6 +107,8 @@ class Range
|
||||
$ranges['next'] = [$nextStart->format('Y-m-d'), $nextEnd->format('Y-m-d')];
|
||||
|
||||
switch ($viewRange) {
|
||||
default:
|
||||
throw new FireflyException('The date picker does not yet support "' . $viewRange . '".');
|
||||
case '1D':
|
||||
$format = (string)trans('config.month_and_day');
|
||||
break;
|
||||
@@ -122,8 +124,6 @@ class Range
|
||||
case '1M':
|
||||
$format = (string)trans('config.month');
|
||||
break;
|
||||
default:
|
||||
throw new FireflyException('The date picker does not yet support "' . $viewRange . '".');
|
||||
case '1W':
|
||||
$format = (string)trans('config.week_in_year');
|
||||
break;
|
||||
|
||||
@@ -97,4 +97,4 @@ class SplitJournalFormRequest extends Request
|
||||
'piggy_bank_id.*' => 'between:1,255',
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -599,4 +599,4 @@ Breadcrumbs::register(
|
||||
$breadcrumbs->parent('transactions.index', $what);
|
||||
$breadcrumbs->push(trans('breadcrumbs.create_' . e($what)), route('split.journal.create', [$what]));
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user