mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Consistent overview for #1292
This commit is contained in:
@@ -78,6 +78,7 @@ class BudgetController extends Controller
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function amount(Request $request, BudgetRepositoryInterface $repository, Budget $budget)
|
||||
{
|
||||
@@ -141,6 +142,7 @@ class BudgetController extends Controller
|
||||
* @param Request $request
|
||||
*
|
||||
* @return View
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function create(Request $request)
|
||||
{
|
||||
@@ -174,6 +176,7 @@ class BudgetController extends Controller
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function destroy(Request $request, Budget $budget)
|
||||
{
|
||||
@@ -190,6 +193,7 @@ class BudgetController extends Controller
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return View
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function edit(Request $request, Budget $budget)
|
||||
{
|
||||
@@ -222,12 +226,13 @@ class BudgetController extends Controller
|
||||
$pageSize = intval(Preferences::get('listPageSize', 50)->data);
|
||||
|
||||
// make date if present:
|
||||
if (null !== $moment || 0 !== strlen(strval($moment))) {
|
||||
if (null !== $moment || '' !== (string)$moment) {
|
||||
try {
|
||||
$start = new Carbon($moment);
|
||||
$end = app('navigation')->endOfPeriod($start, $range);
|
||||
} catch (Exception $e) {
|
||||
// start and end are already defined.
|
||||
Log::debug('start and end are already defined.');
|
||||
}
|
||||
}
|
||||
$next = clone $end;
|
||||
@@ -330,7 +335,7 @@ class BudgetController extends Controller
|
||||
// @codeCoverageIgnoreStart
|
||||
$result = $cache->get();
|
||||
|
||||
return view('budgets.info', compact('result', 'begin', 'currentEnd'));
|
||||
return view('budgets.info', compact('result'));
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
$result = [
|
||||
@@ -451,6 +456,7 @@ class BudgetController extends Controller
|
||||
* @param BudgetIncomeRequest $request
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function postUpdateIncome(BudgetIncomeRequest $request)
|
||||
{
|
||||
@@ -471,14 +477,15 @@ class BudgetController extends Controller
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return View
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function show(Request $request, Budget $budget)
|
||||
{
|
||||
/** @var Carbon $start */
|
||||
$start = session('first', Carbon::create()->startOfYear());
|
||||
$end = new Carbon;
|
||||
$page = intval($request->get('page'));
|
||||
$pageSize = intval(Preferences::get('listPageSize', 50)->data);
|
||||
$page = (int)$request->get('page');
|
||||
$pageSize = (int)Preferences::get('listPageSize', 50)->data;
|
||||
$limits = $this->getLimits($budget, $start, $end);
|
||||
$repetition = null;
|
||||
|
||||
@@ -501,6 +508,7 @@ class BudgetController extends Controller
|
||||
*
|
||||
* @return View
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function showByBudgetLimit(Request $request, Budget $budget, BudgetLimit $budgetLimit)
|
||||
@@ -538,6 +546,7 @@ class BudgetController extends Controller
|
||||
* @param BudgetFormRequest $request
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function store(BudgetFormRequest $request)
|
||||
{
|
||||
@@ -563,6 +572,7 @@ class BudgetController extends Controller
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function update(BudgetFormRequest $request, Budget $budget)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user