mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-06 04:34:00 +00:00
Code cleanup.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers\RuleGroup;
|
||||
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Http\Requests\RuleGroupFormRequest;
|
||||
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
|
||||
@@ -49,7 +50,7 @@ class CreateController extends Controller
|
||||
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
app('view')->share('title', (string) trans('firefly.rules'));
|
||||
app('view')->share('title', (string)trans('firefly.rules'));
|
||||
app('view')->share('mainTitleIcon', 'fa-random');
|
||||
|
||||
$this->repository = app(RuleGroupRepositoryInterface::class);
|
||||
@@ -67,7 +68,7 @@ class CreateController extends Controller
|
||||
public function create()
|
||||
{
|
||||
$subTitleIcon = 'fa-clone';
|
||||
$subTitle = (string) trans('firefly.make_new_rule_group');
|
||||
$subTitle = (string)trans('firefly.make_new_rule_group');
|
||||
|
||||
// put previous url in session if not redirect from store (not "create another").
|
||||
if (true !== session('rule-groups.create.fromStore')) {
|
||||
@@ -90,11 +91,11 @@ class CreateController extends Controller
|
||||
$data = $request->getRuleGroupData();
|
||||
$ruleGroup = $this->repository->store($data);
|
||||
|
||||
session()->flash('success', (string) trans('firefly.created_new_rule_group', ['title' => $ruleGroup->title]));
|
||||
session()->flash('success', (string)trans('firefly.created_new_rule_group', ['title' => $ruleGroup->title]));
|
||||
app('preferences')->mark();
|
||||
|
||||
$redirect = redirect($this->getPreviousUri('rule-groups.create.uri'));
|
||||
if (1 === (int) $request->get('create_another')) {
|
||||
if (1 === (int)$request->get('create_another')) {
|
||||
// @codeCoverageIgnoreStart
|
||||
session()->put('rule-groups.create.fromStore', true);
|
||||
|
||||
|
Reference in New Issue
Block a user