mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-08 18:58:07 +00:00
Various code cleanup.
This commit is contained in:
@@ -83,6 +83,7 @@ class AccountController extends Controller
|
||||
* This chart is (multi) currency aware.
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function expenseAccounts(): JsonResponse
|
||||
{
|
||||
@@ -194,6 +195,7 @@ class AccountController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function expenseBudget(Account $account, Carbon $start, Carbon $end): JsonResponse
|
||||
{
|
||||
@@ -268,6 +270,7 @@ class AccountController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function expenseCategory(Account $account, Carbon $start, Carbon $end): JsonResponse
|
||||
{
|
||||
@@ -322,6 +325,7 @@ class AccountController extends Controller
|
||||
* @param AccountRepositoryInterface $repository
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
*/
|
||||
public function frontpage(AccountRepositoryInterface $repository): JsonResponse
|
||||
{
|
||||
@@ -364,6 +368,7 @@ class AccountController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function incomeCategory(Account $account, Carbon $start, Carbon $end): JsonResponse
|
||||
{
|
||||
@@ -421,6 +426,8 @@ class AccountController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function period(Account $account, Carbon $start, Carbon $end): JsonResponse
|
||||
{
|
||||
@@ -458,6 +465,8 @@ class AccountController extends Controller
|
||||
* @param TransactionCurrency $currency
|
||||
*
|
||||
* @return array
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
private function periodByCurrency(Carbon $start, Carbon $end, Account $account, TransactionCurrency $currency): array
|
||||
{
|
||||
@@ -528,6 +537,7 @@ class AccountController extends Controller
|
||||
* This chart is multi-currency aware.
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function revenueAccounts(): JsonResponse
|
||||
{
|
||||
|
||||
@@ -57,6 +57,7 @@ class BillController extends Controller
|
||||
* @param BillRepositoryInterface $repository
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function frontpage(BillRepositoryInterface $repository): JsonResponse
|
||||
{
|
||||
@@ -102,6 +103,7 @@ class BillController extends Controller
|
||||
* @param Bill $bill
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function single(Bill $bill): JsonResponse
|
||||
{
|
||||
|
||||
@@ -84,6 +84,7 @@ class BudgetController extends Controller
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function budget(Budget $budget): JsonResponse
|
||||
{
|
||||
@@ -152,6 +153,7 @@ class BudgetController extends Controller
|
||||
* @return JsonResponse
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function budgetLimit(Budget $budget, BudgetLimit $budgetLimit): JsonResponse
|
||||
{
|
||||
@@ -202,6 +204,7 @@ class BudgetController extends Controller
|
||||
* @param BudgetLimit|null $budgetLimit
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function expenseAsset(Budget $budget, ?BudgetLimit $budgetLimit = null): JsonResponse
|
||||
{
|
||||
@@ -270,6 +273,7 @@ class BudgetController extends Controller
|
||||
* @param BudgetLimit|null $budgetLimit
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function expenseCategory(Budget $budget, ?BudgetLimit $budgetLimit = null): JsonResponse
|
||||
{
|
||||
@@ -334,6 +338,7 @@ class BudgetController extends Controller
|
||||
* @param BudgetLimit|null $budgetLimit
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function expenseExpense(Budget $budget, ?BudgetLimit $budgetLimit = null): JsonResponse
|
||||
{
|
||||
@@ -397,7 +402,7 @@ class BudgetController extends Controller
|
||||
* Shows a budget list with spent/left/overspent.
|
||||
*
|
||||
* @return JsonResponse
|
||||
*
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function frontpage(): JsonResponse
|
||||
{
|
||||
@@ -435,6 +440,7 @@ class BudgetController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function period(Budget $budget, TransactionCurrency $currency, Collection $accounts, Carbon $start, Carbon $end): JsonResponse
|
||||
{
|
||||
@@ -510,6 +516,7 @@ class BudgetController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function periodNoBudget(TransactionCurrency $currency, Collection $accounts, Carbon $start, Carbon $end): JsonResponse
|
||||
{
|
||||
|
||||
@@ -63,11 +63,13 @@ class CategoryController extends Controller
|
||||
|
||||
/**
|
||||
* Show an overview for a category for all time, per month/week/year.
|
||||
* See reference nr. 59
|
||||
* See reference nr. 59
|
||||
*
|
||||
* @param Category $category
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function all(Category $category): JsonResponse
|
||||
{
|
||||
@@ -111,9 +113,10 @@ class CategoryController extends Controller
|
||||
|
||||
/**
|
||||
* Shows the category chart on the front page.
|
||||
* See reference nr. 60
|
||||
* See reference nr. 60
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function frontPage(): JsonResponse
|
||||
{
|
||||
@@ -138,7 +141,7 @@ class CategoryController extends Controller
|
||||
|
||||
/**
|
||||
* Chart report.
|
||||
* See reference nr. 61
|
||||
* See reference nr. 61
|
||||
*
|
||||
* @param Category $category
|
||||
* @param Collection $accounts
|
||||
@@ -146,6 +149,7 @@ class CategoryController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function reportPeriod(Category $category, Collection $accounts, Carbon $start, Carbon $end): JsonResponse
|
||||
{
|
||||
@@ -254,13 +258,14 @@ class CategoryController extends Controller
|
||||
|
||||
/**
|
||||
* Chart for period for transactions without a category.
|
||||
* See reference nr. 62
|
||||
* See reference nr. 62
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function reportPeriodNoCategory(Collection $accounts, Carbon $start, Carbon $end): JsonResponse
|
||||
{
|
||||
@@ -281,12 +286,14 @@ class CategoryController extends Controller
|
||||
|
||||
/**
|
||||
* Chart for a specific period.
|
||||
* See reference nr. 63
|
||||
* See reference nr. 63
|
||||
*
|
||||
* @param Category $category
|
||||
* @param Carbon $date
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \FireflyIII\Exceptions\FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function specificPeriod(Category $category, Carbon $date): JsonResponse
|
||||
{
|
||||
|
||||
@@ -69,7 +69,7 @@ class ExpenseReportController extends Controller
|
||||
/**
|
||||
* Main chart that shows income and expense for a combination of expense/revenue accounts.
|
||||
*
|
||||
* See reference nr. 58
|
||||
* See reference nr. 58
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Collection $expense
|
||||
@@ -77,7 +77,7 @@ class ExpenseReportController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return JsonResponse
|
||||
*
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function mainChart(Collection $accounts, Collection $expense, Carbon $start, Carbon $end): JsonResponse
|
||||
{
|
||||
|
||||
@@ -31,7 +31,6 @@ use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface;
|
||||
use FireflyIII\Support\CacheProperties;
|
||||
use FireflyIII\Support\Http\Controllers\DateCalculation;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class PiggyBankController.
|
||||
@@ -58,13 +57,13 @@ class PiggyBankController extends Controller
|
||||
/**
|
||||
* Shows the piggy bank history.
|
||||
*
|
||||
* See reference nr. 53
|
||||
* See reference nr. 53
|
||||
*
|
||||
* @param PiggyBankRepositoryInterface $repository
|
||||
* @param PiggyBank $piggyBank
|
||||
*
|
||||
* @return JsonResponse
|
||||
*
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function history(PiggyBankRepositoryInterface $repository, PiggyBank $piggyBank): JsonResponse
|
||||
{
|
||||
|
||||
@@ -68,6 +68,7 @@ class ReportController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function netWorth(Collection $accounts, Carbon $start, Carbon $end): JsonResponse
|
||||
{
|
||||
@@ -142,6 +143,7 @@ class ReportController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function operations(Collection $accounts, Carbon $start, Carbon $end): JsonResponse
|
||||
{
|
||||
|
||||
@@ -56,6 +56,7 @@ class TransactionController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function budgets(Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -100,6 +101,7 @@ class TransactionController extends Controller
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function categories(string $objectType, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -158,6 +160,7 @@ class TransactionController extends Controller
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function destinationAccounts(string $objectType, Carbon $start, Carbon $end)
|
||||
{
|
||||
@@ -215,6 +218,7 @@ class TransactionController extends Controller
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function sourceAccounts(string $objectType, Carbon $start, Carbon $end)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user