Various code cleanup.

This commit is contained in:
James Cole
2018-07-08 12:08:53 +02:00
parent 2f2f907ffe
commit b315882f58
56 changed files with 465 additions and 396 deletions

View File

@@ -34,16 +34,16 @@ use Illuminate\Support\Collection;
*/
class BudgetController extends Controller
{
/**
* @param BudgetReportHelperInterface $helper
* @param Collection $accounts
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
* @param Carbon $start
* @param Carbon $end
*
* @return mixed|string
* @throws \Throwable
*/
public function general(BudgetReportHelperInterface $helper, Collection $accounts, Carbon $start, Carbon $end)
public function general(Collection $accounts, Carbon $start, Carbon $end)
{
// chart properties for cache:
$cache = new CacheProperties;
@@ -54,7 +54,7 @@ class BudgetController extends Controller
if ($cache->has()) {
return $cache->get(); // @codeCoverageIgnore
}
$helper = app(BudgetReportHelperInterface::class);
$budgets = $helper->getBudgetReport($start, $end, $accounts);
$result = view('reports.partials.budgets', compact('budgets'))->render();
@@ -63,6 +63,7 @@ class BudgetController extends Controller
return $result;
}
/**
* @param Collection $accounts
* @param Carbon $start