mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-30 12:43:57 -06:00
Some code cleanup.
This commit is contained in:
parent
0809cfdc6d
commit
41f200e630
@ -121,12 +121,12 @@ class CategoryController extends Controller
|
|||||||
$outside = $repository->sumSpentNoCategory(new Collection, $start, $end);
|
$outside = $repository->sumSpentNoCategory(new Collection, $start, $end);
|
||||||
|
|
||||||
// this is a "fake" entry for the "no category" entry.
|
// this is a "fake" entry for the "no category" entry.
|
||||||
$entry = new stdClass();
|
$entry = new stdClass();
|
||||||
$entry->name = trans('firefly.no_category');
|
$entry->name = trans('firefly.no_category');
|
||||||
$entry->spent = $outside;
|
$entry->spent = $outside;
|
||||||
$set->push($entry);
|
$set->push($entry);
|
||||||
|
|
||||||
$set = $set->sortBy('spent');
|
$set = $set->sortBy('spent');
|
||||||
$data = $this->generator->frontpage($set);
|
$data = $this->generator->frontpage($set);
|
||||||
$cache->store($data);
|
$cache->store($data);
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ class PiggyBankController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ARI $repository
|
* @param ARI $repository
|
||||||
* @param PiggyBankRepositoryInterface $piggyRepository
|
* @param PiggyBankRepositoryInterface $piggyRepository
|
||||||
*
|
*
|
||||||
* @return View
|
* @return View
|
||||||
|
@ -10,11 +10,8 @@
|
|||||||
namespace FireflyIII\Http\Controllers;
|
namespace FireflyIII\Http\Controllers;
|
||||||
|
|
||||||
use Auth;
|
use Auth;
|
||||||
use Config;
|
|
||||||
use ExpandedForm;
|
|
||||||
use FireflyIII\Http\Requests;
|
use FireflyIII\Http\Requests;
|
||||||
use FireflyIII\Http\Requests\RuleFormRequest;
|
use FireflyIII\Http\Requests\RuleFormRequest;
|
||||||
use FireflyIII\Http\Requests\RuleGroupFormRequest;
|
|
||||||
use FireflyIII\Models\Rule;
|
use FireflyIII\Models\Rule;
|
||||||
use FireflyIII\Models\RuleAction;
|
use FireflyIII\Models\RuleAction;
|
||||||
use FireflyIII\Models\RuleGroup;
|
use FireflyIII\Models\RuleGroup;
|
||||||
@ -284,14 +281,19 @@ class RuleController extends Controller
|
|||||||
Session::flash('gaEventCategory', 'rules');
|
Session::flash('gaEventCategory', 'rules');
|
||||||
Session::flash('gaEventAction', 'edit-rule');
|
Session::flash('gaEventAction', 'edit-rule');
|
||||||
|
|
||||||
return view('rules.rule.edit', compact('rule', 'subTitle', 'primaryTrigger',
|
return view(
|
||||||
'oldTriggers', 'oldActions', 'triggerCount', 'actionCount'));
|
'rules.rule.edit', compact(
|
||||||
|
'rule', 'subTitle', 'primaryTrigger',
|
||||||
|
'oldTriggers', 'oldActions', 'triggerCount', 'actionCount'
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param RuleRepositoryInterface $repository
|
* @param RuleRepositoryInterface $repository
|
||||||
* @param RuleFormRequest $request
|
* @param RuleFormRequest $request
|
||||||
* @param Rule $rule
|
* @param Rule $rule
|
||||||
|
*
|
||||||
* @return $this|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
* @return $this|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||||
*/
|
*/
|
||||||
public function updateRule(RuleRepositoryInterface $repository, RuleFormRequest $request, Rule $rule)
|
public function updateRule(RuleRepositoryInterface $repository, RuleFormRequest $request, Rule $rule)
|
||||||
@ -328,10 +330,10 @@ class RuleController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param RuleRepositoryInterface $repository
|
* @param Rule $rule
|
||||||
* @param Rule $rule
|
|
||||||
*
|
*
|
||||||
* @return View
|
* @return View
|
||||||
|
* @internal param RuleRepositoryInterface $repository
|
||||||
*/
|
*/
|
||||||
public function deleteRule(Rule $rule)
|
public function deleteRule(Rule $rule)
|
||||||
{
|
{
|
||||||
@ -346,8 +348,6 @@ class RuleController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Rule $rule
|
* @param Rule $rule
|
||||||
* @param RuleRepositoryInterface $repository
|
* @param RuleRepositoryInterface $repository
|
||||||
|
@ -6,7 +6,6 @@ use Auth;
|
|||||||
use ExpandedForm;
|
use ExpandedForm;
|
||||||
use FireflyIII\Http\Requests\RuleGroupFormRequest;
|
use FireflyIII\Http\Requests\RuleGroupFormRequest;
|
||||||
use FireflyIII\Models\RuleGroup;
|
use FireflyIII\Models\RuleGroup;
|
||||||
use FireflyIII\Repositories\Rule\RuleRepositoryInterface;
|
|
||||||
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
|
use FireflyIII\Repositories\RuleGroup\RuleGroupRepositoryInterface;
|
||||||
use Input;
|
use Input;
|
||||||
use Preferences;
|
use Preferences;
|
||||||
@ -52,8 +51,8 @@ class RuleGroupController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param RuleGroupFormRequest $request
|
* @param RuleGroupFormRequest $request
|
||||||
* @param RuleRepositoryInterface $repository
|
* @param RuleGroupRepositoryInterface $repository
|
||||||
*
|
*
|
||||||
* @return $this|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
* @return $this|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||||
*/
|
*/
|
||||||
@ -103,9 +102,9 @@ class RuleGroupController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param RuleGroupFormRequest $request
|
* @param RuleGroupFormRequest $request
|
||||||
* @param RuleRepositoryInterface $repository
|
* @param RuleGroupRepositoryInterface $repository
|
||||||
* @param RuleGroup $ruleGroup
|
* @param RuleGroup $ruleGroup
|
||||||
*
|
*
|
||||||
* @return $this|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
* @return $this|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||||
*/
|
*/
|
||||||
@ -135,8 +134,8 @@ class RuleGroupController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param RuleRepositoryInterface $repository
|
* @param RuleGroupRepositoryInterface $repository
|
||||||
* @param RuleGroup $ruleGroup
|
* @param RuleGroup $ruleGroup
|
||||||
*
|
*
|
||||||
* @return View
|
* @return View
|
||||||
*/
|
*/
|
||||||
@ -156,8 +155,9 @@ class RuleGroupController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param RuleGroup $ruleGroup
|
* @param RuleGroupRepositoryInterface $repository
|
||||||
* @param RuleRepositoryInterface $repository
|
*
|
||||||
|
* @param RuleGroup $ruleGroup
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Http\RedirectResponse
|
* @return \Illuminate\Http\RedirectResponse
|
||||||
*/
|
*/
|
||||||
@ -179,8 +179,8 @@ class RuleGroupController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param RuleRepositoryInterface $repository
|
* @param RuleGroupRepositoryInterface $repository
|
||||||
* @param RuleGroup $ruleGroup
|
* @param RuleGroup $ruleGroup
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||||
*/
|
*/
|
||||||
@ -193,8 +193,8 @@ class RuleGroupController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param RuleRepositoryInterface $repository
|
* @param RuleGroupRepositoryInterface $repository
|
||||||
* @param RuleGroup $ruleGroup
|
* @param RuleGroup $ruleGroup
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||||
*/
|
*/
|
||||||
|
@ -5,6 +5,11 @@ namespace FireflyIII\Http\Middleware;
|
|||||||
use Closure;
|
use Closure;
|
||||||
use FireflyIII\Support\Domain;
|
use FireflyIII\Support\Domain;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Binder
|
||||||
|
*
|
||||||
|
* @package FireflyIII\Http\Middleware
|
||||||
|
*/
|
||||||
class Binder
|
class Binder
|
||||||
{
|
{
|
||||||
protected $binders = [];
|
protected $binders = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user