Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Made reportType camelCase.
James Cole026683a8e150
diff --git a/app/Http/Controllers/Chart/AccountController.php b/app/Http/Controllers/Chart/AccountController.phpindex 5048553403..d403f56dc5 100644--- a/app/Http/Controllers/Chart/AccountController.php+++ b/app/Http/Controllers/Chart/AccountController.php@@ -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();diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.phpindex 767a87280b..386a10636c 100644--- a/app/Http/Controllers/Chart/BudgetController.php+++ b/app/Http/Controllers/Chart/BudgetController.php@@ -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');diff --git a/app/Http/Controllers/Chart/CategoryController.php b/app/Http/Controllers/Chart/CategoryController.phpindex 6511dd92ac..3866463570 100644--- a/app/Http/Controllers/Chart/CategoryController.php+++ b/app/Http/Controllers/Chart/CategoryController.php@@ -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');diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.phpindex 9311589093..f289262064 100644--- a/app/Http/Controllers/Chart/ReportController.php+++ b/app/Http/Controllers/Chart/ReportController.php@@ -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:diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.phpindex ccf47d7e4a..3ede022898 100644--- a/app/Http/Controllers/ReportController.php+++ b/app/Http/Controllers/ReportController.php@@ -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 Controllerreturn 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 Controllerreturn 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);}diff --git a/app/Http/routes.php b/app/Http/routes.phpindex ac043af6f3..21dec7d669 100644--- a/app/Http/routes.php+++ b/app/Http/routes.php@@ -389,7 +389,7 @@ Route::group(// accounts:Route::get('/chart/account/frontpage', ['uses' => 'Chart\AccountController@frontpage']);Route::get('/chart/account/expense', ['uses' => 'Chart\AccountController@expenseAccounts']);- Route::get('/chart/account/report/{report_type}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\AccountController@report']);+ Route::get('/chart/account/report/{reportType}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\AccountController@report']);Route::get('/chart/account/{account}', ['uses' => 'Chart\AccountController@single']);@@ -401,8 +401,8 @@ Route::group(Route::get('/chart/budget/frontpage', ['uses' => 'Chart\BudgetController@frontpage']);// this chart is used in reports:- Route::get('/chart/budget/year/{report_type}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\BudgetController@year']);- Route::get('/chart/budget/multi-year/{report_type}/{start_date}/{end_date}/{accountList}/{budgetList}', ['uses' => 'Chart\BudgetController@multiYear']);+ Route::get('/chart/budget/year/{reportType}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\BudgetController@year']);+ Route::get('/chart/budget/multi-year/{reportType}/{start_date}/{end_date}/{accountList}/{budgetList}', ['uses' => 'Chart\BudgetController@multiYear']);Route::get('/chart/budget/{budget}/{limitrepetition}', ['uses' => 'Chart\BudgetController@budgetLimit']);Route::get('/chart/budget/{budget}', ['uses' => 'Chart\BudgetController@budget']);@@ -411,10 +411,10 @@ Route::group(Route::get('/chart/category/frontpage', ['uses' => 'Chart\CategoryController@frontpage']);// these three charts are for reports:- Route::get('/chart/category/earned-in-period/{report_type}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\CategoryController@earnedInPeriod']);- Route::get('/chart/category/spent-in-period/{report_type}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\CategoryController@spentInPeriod']);+ Route::get('/chart/category/earned-in-period/{reportType}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\CategoryController@earnedInPeriod']);+ Route::get('/chart/category/spent-in-period/{reportType}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\CategoryController@spentInPeriod']);Route::get(- '/chart/category/multi-year/{report_type}/{start_date}/{end_date}/{accountList}/{categoryList}', ['uses' => 'Chart\CategoryController@multiYear']+ '/chart/category/multi-year/{reportType}/{start_date}/{end_date}/{accountList}/{categoryList}', ['uses' => 'Chart\CategoryController@multiYear']);Route::get('/chart/category/{category}/period', ['uses' => 'Chart\CategoryController@currentPeriod']);@@ -425,8 +425,8 @@ Route::group(Route::get('/chart/piggyBank/{piggyBank}', ['uses' => 'Chart\PiggyBankController@history']);// reports:- Route::get('/chart/report/in-out/{report_type}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\ReportController@yearInOut']);- Route::get('/chart/report/in-out-sum/{report_type}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\ReportController@yearInOutSummarized']);+ Route::get('/chart/report/in-out/{reportType}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\ReportController@yearInOut']);+ Route::get('/chart/report/in-out-sum/{reportType}/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\ReportController@yearInOutSummarized']);/**@@ -492,7 +492,7 @@ Route::group(* Report Controller*/Route::get('/reports', ['uses' => 'ReportController@index', 'as' => 'reports.index']);- Route::get('/reports/report/{report_type}/{start_date}/{end_date}/{accountList}', ['uses' => 'ReportController@report', 'as' => 'reports.report']);+ Route::get('/reports/report/{reportType}/{start_date}/{end_date}/{accountList}', ['uses' => 'ReportController@report', 'as' => 'reports.report']);/*** Search Controllerdiff --git a/resources/twig/reports/default/month.twig b/resources/twig/reports/default/month.twigindex 4a1008753b..4b7a9401a5 100644--- a/resources/twig/reports/default/month.twig+++ b/resources/twig/reports/default/month.twig@@ -1,7 +1,7 @@{% extends "./layout/default.twig" %}{% block breadcrumbs %}- {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, start, end, report_type, accountIds) }}+ {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, start, end, reportType, accountIds) }}{% endblock %}{% block content %}@@ -75,7 +75,7 @@// to report another URL:var startDate = '{{ start.format('Ymd') }}';var endDate = '{{ end.format('Ymd') }}';- var reportType = '{{ report_type }}';+ var reportType = '{{ reportType }}';var accountIds = '{{ accountIds }}';var incomeTopLength = {{ incomeTopLength }};diff --git a/resources/twig/reports/default/multi-year.twig b/resources/twig/reports/default/multi-year.twigindex 6e7b218791..1d1334b1b9 100644--- a/resources/twig/reports/default/multi-year.twig+++ b/resources/twig/reports/default/multi-year.twig@@ -1,7 +1,7 @@{% extends "./layout/default.twig" %}{% block breadcrumbs %}- {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, start, end, report_type, accountIds) }}+ {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, start, end, reportType, accountIds) }}{% endblock %}{% block content %}@@ -125,7 +125,7 @@// to report another URL:var startDate = '{{ start.format('Ymd') }}';var endDate = '{{ end.format('Ymd') }}';- var reportType = '{{ report_type }}';+ var reportType = '{{ reportType }}';var accountIds = '{{ accountIds }}';</script><script type="text/javascript" src="js/reports/default/multi-year.js"></script>diff --git a/resources/twig/reports/default/year.twig b/resources/twig/reports/default/year.twigindex d69be74f88..b54a71131d 100644--- a/resources/twig/reports/default/year.twig+++ b/resources/twig/reports/default/year.twig@@ -1,7 +1,7 @@{% extends "./layout/default.twig" %}{% block breadcrumbs %}- {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, start, end, report_type, accountIds) }}+ {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, start, end, reportType, accountIds) }}{% endblock %}{% block content %}@@ -92,7 +92,7 @@// to report another URL:var startDate = '{{ start.format('Ymd') }}';var endDate = '{{ end.format('Ymd') }}';- var reportType = '{{ report_type }}';+ var reportType = '{{ reportType }}';var accountIds = '{{ accountIds }}';