Made reportType camelCase.

This commit is contained in:
James Cole
2015-12-28 20:04:54 +01:00
parent 6ab6dd6ac3
commit 026683a8e1
9 changed files with 52 additions and 52 deletions

View File

@@ -37,14 +37,14 @@ class AccountController extends Controller
/**
* Shows the balances for a given set of dates and accounts.
*
* @param $report_type
* @param $reportType
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return \Illuminate\Http\JsonResponse
*/
public function report($report_type, Carbon $start, Carbon $end, Collection $accounts)
public function report($reportType, Carbon $start, Carbon $end, Collection $accounts)
{
// chart properties for cache:
$cache = new CacheProperties();

View File

@@ -40,7 +40,7 @@ class BudgetController extends Controller
* TODO expand with no budget chart.
*
* @param BudgetRepositoryInterface $repository
* @param $report_type
* @param $reportType
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
@@ -48,11 +48,11 @@ class BudgetController extends Controller
*
* @return \Illuminate\Http\JsonResponse
*/
public function multiYear(BudgetRepositoryInterface $repository, $report_type, Carbon $start, Carbon $end, Collection $accounts, Collection $budgets)
public function multiYear(BudgetRepositoryInterface $repository, $reportType, Carbon $start, Carbon $end, Collection $accounts, Collection $budgets)
{
// chart properties for cache:
$cache = new CacheProperties();
$cache->addProperty($report_type);
$cache->addProperty($reportType);
$cache->addProperty($start);
$cache->addProperty($end);
$cache->addProperty($accounts);
@@ -281,20 +281,20 @@ class BudgetController extends Controller
* TODO expand with no budget chart.
*
* @param BudgetRepositoryInterface $repository
* @param $report_type
* @param $reportType
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return \Illuminate\Http\JsonResponse
*/
public function year(BudgetRepositoryInterface $repository, $report_type, Carbon $start, Carbon $end, Collection $accounts)
public function year(BudgetRepositoryInterface $repository, $reportType, Carbon $start, Carbon $end, Collection $accounts)
{
// chart properties for cache:
$cache = new CacheProperties();
$cache->addProperty($start);
$cache->addProperty($end);
$cache->addProperty($report_type);
$cache->addProperty($reportType);
$cache->addProperty($accounts);
$cache->addProperty('budget');
$cache->addProperty('year');

View File

@@ -130,7 +130,7 @@ class CategoryController extends Controller
/**
* @param CategoryRepositoryInterface $repository
* @param $report_type
* @param $reportType
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
@@ -138,11 +138,11 @@ class CategoryController extends Controller
*
* @return \Illuminate\Http\JsonResponse
*/
public function multiYear(CategoryRepositoryInterface $repository, $report_type, Carbon $start, Carbon $end, Collection $accounts, Collection $categories)
public function multiYear(CategoryRepositoryInterface $repository, $reportType, Carbon $start, Carbon $end, Collection $accounts, Collection $categories)
{
// chart properties for cache:
$cache = new CacheProperties();
$cache->addProperty($report_type);
$cache->addProperty($reportType);
$cache->addProperty($start);
$cache->addProperty($end);
$cache->addProperty($accounts);
@@ -296,20 +296,20 @@ class CategoryController extends Controller
* grouped by month.
*
* @param CategoryRepositoryInterface $repository
* @param $report_type
* @param $reportType
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return \Illuminate\Http\JsonResponse
*/
public function earnedInPeriod(CategoryRepositoryInterface $repository, $report_type, Carbon $start, Carbon $end, Collection $accounts)
public function earnedInPeriod(CategoryRepositoryInterface $repository, $reportType, Carbon $start, Carbon $end, Collection $accounts)
{
$original = clone $start;
$cache = new CacheProperties; // chart properties for cache:
$cache->addProperty($start);
$cache->addProperty($end);
$cache->addProperty($report_type);
$cache->addProperty($reportType);
$cache->addProperty($accounts);
$cache->addProperty('category');
$cache->addProperty('earned-in-period');
@@ -400,20 +400,20 @@ class CategoryController extends Controller
* grouped by month.
*
* @param CategoryRepositoryInterface $repository
* @param $report_type
* @param $reportType
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return \Illuminate\Http\JsonResponse
*/
public function spentInPeriod(CategoryRepositoryInterface $repository, $report_type, Carbon $start, Carbon $end, Collection $accounts)
public function spentInPeriod(CategoryRepositoryInterface $repository, $reportType, Carbon $start, Carbon $end, Collection $accounts)
{
$original = clone $start;
$cache = new CacheProperties; // chart properties for cache:
$cache->addProperty($start);
$cache->addProperty($end);
$cache->addProperty($report_type);
$cache->addProperty($reportType);
$cache->addProperty($accounts);
$cache->addProperty('category');
$cache->addProperty('spent-in-period');

View File

@@ -36,14 +36,14 @@ class ReportController extends Controller
* Summarizes all income and expenses, per month, for a given year.
*
* @param ReportQueryInterface $query
* @param $report_type
* @param $reportType
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return \Illuminate\Http\JsonResponse
*/
public function yearInOut(ReportQueryInterface $query, $report_type, Carbon $start, Carbon $end, Collection $accounts)
public function yearInOut(ReportQueryInterface $query, $reportType, Carbon $start, Carbon $end, Collection $accounts)
{
// chart properties for cache:
$cache = new CacheProperties;
@@ -105,14 +105,14 @@ class ReportController extends Controller
* Summarizes all income and expenses for a given year. Gives a total and an average.
*
* @param ReportQueryInterface $query
* @param $report_type
* @param $reportType
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return \Illuminate\Http\JsonResponse
*/
public function yearInOutSummarized(ReportQueryInterface $query, $report_type, Carbon $start, Carbon $end, Collection $accounts)
public function yearInOutSummarized(ReportQueryInterface $query, $reportType, Carbon $start, Carbon $end, Collection $accounts)
{
// chart properties for cache:

View File

@@ -73,14 +73,14 @@ class ReportController extends Controller
}
/**
* @param $report_type
* @param $reportType
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return View
*/
public function defaultYear($report_type, Carbon $start, Carbon $end, Collection $accounts)
public function defaultYear($reportType, Carbon $start, Carbon $end, Collection $accounts)
{
$incomeTopLength = 8;
$expenseTopLength = 8;
@@ -104,7 +104,7 @@ class ReportController extends Controller
return view(
'reports.default.year',
compact(
'start', 'accountReport', 'incomes', 'report_type', 'accountIds', 'end',
'start', 'accountReport', 'incomes', 'reportType', 'accountIds', 'end',
'expenses', 'incomeTopLength', 'expenseTopLength'
)
);
@@ -112,14 +112,14 @@ class ReportController extends Controller
/**
* @param $report_type
* @param $reportType
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return View
*/
public function defaultMonth($report_type, Carbon $start, Carbon $end, Collection $accounts)
public function defaultMonth($reportType, Carbon $start, Carbon $end, Collection $accounts)
{
$incomeTopLength = 8;
$expenseTopLength = 8;
@@ -145,27 +145,27 @@ class ReportController extends Controller
return view(
'reports.default.month',
compact(
'start', 'end', 'report_type',
'start', 'end', 'reportType',
'accountReport',
'incomes', 'incomeTopLength',
'expenses', 'expenseTopLength',
'budgets', 'balance',
'categories',
'bills',
'accountIds', 'report_type'
'accountIds', 'reportType'
)
);
}
/**
* @param $report_type
* @param $reportType
* @param $start
* @param $end
* @param $accounts
*
* @return View
*/
public function defaultMultiYear($report_type, $start, $end, $accounts)
public function defaultMultiYear($reportType, $start, $end, $accounts)
{
@@ -182,19 +182,19 @@ class ReportController extends Controller
$accountIds = join(',', $accountIds);
return view(
'reports.default.multi-year', compact('budgets', 'accounts', 'categories', 'start', 'end', 'accountIds', 'report_type')
'reports.default.multi-year', compact('budgets', 'accounts', 'categories', 'start', 'end', 'accountIds', 'reportType')
);
}
/**
* @param $report_type
* @param $reportType
* @param Carbon $start
* @param Carbon $end
* @param Collection $accounts
*
* @return View
*/
public function report($report_type, Carbon $start, Carbon $end, Collection $accounts)
public function report($reportType, Carbon $start, Carbon $end, Collection $accounts)
{
// throw an error if necessary.
if ($end < $start) {
@@ -206,7 +206,7 @@ class ReportController extends Controller
$start = Session::get('first');
}
switch ($report_type) {
switch ($reportType) {
default:
case 'default':
@@ -223,14 +223,14 @@ class ReportController extends Controller
// more than one year date difference means year report.
if ($start->diffInMonths($end) > 12) {
return $this->defaultMultiYear($report_type, $start, $end, $accounts);
return $this->defaultMultiYear($reportType, $start, $end, $accounts);
}
// more than two months date difference means year report.
if ($start->diffInMonths($end) > 1) {
return $this->defaultYear($report_type, $start, $end, $accounts);
return $this->defaultYear($reportType, $start, $end, $accounts);
}
return $this->defaultMonth($report_type, $start, $end, $accounts);
return $this->defaultMonth($reportType, $start, $end, $accounts);
}