mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-07 14:41:20 +00:00
Expand documentation for Helper directory.
This commit is contained in:
@@ -37,7 +37,7 @@ use Log;
|
||||
*/
|
||||
class BalanceReportHelper implements BalanceReportHelperInterface
|
||||
{
|
||||
/** @var BudgetRepositoryInterface */
|
||||
/** @var BudgetRepositoryInterface Budget repository */
|
||||
protected $budgetRepository;
|
||||
|
||||
/**
|
||||
@@ -52,6 +52,8 @@ class BalanceReportHelper implements BalanceReportHelperInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a balance report.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
@@ -91,6 +93,8 @@ class BalanceReportHelper implements BalanceReportHelperInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Create one balance line.
|
||||
*
|
||||
* @param BudgetLimit $budgetLimit
|
||||
* @param Collection $accounts
|
||||
*
|
||||
@@ -120,6 +124,8 @@ class BalanceReportHelper implements BalanceReportHelperInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a line for transactions without a budget.
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
@@ -143,6 +149,8 @@ class BalanceReportHelper implements BalanceReportHelperInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove unused budgets from the report.
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
* @param Balance $balance
|
||||
*
|
||||
|
||||
@@ -32,6 +32,8 @@ use Illuminate\Support\Collection;
|
||||
interface BalanceReportHelperInterface
|
||||
{
|
||||
/**
|
||||
* Generates the report (duh).
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
|
||||
@@ -33,7 +33,7 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
class BudgetReportHelper implements BudgetReportHelperInterface
|
||||
{
|
||||
/** @var BudgetRepositoryInterface */
|
||||
/** @var BudgetRepositoryInterface The budget repository interface. */
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
@@ -47,6 +47,8 @@ class BudgetReportHelper implements BudgetReportHelperInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the full budget report.
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
|
||||
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
|
||||
* @param Carbon $start
|
||||
@@ -112,6 +114,8 @@ class BudgetReportHelper implements BudgetReportHelperInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all budgets and the expenses in these budgets.
|
||||
*
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param Collection $accounts
|
||||
@@ -142,6 +146,7 @@ class BudgetReportHelper implements BudgetReportHelperInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the expenses for a budget.
|
||||
* @param Budget $budget
|
||||
* @param BudgetLimit $budgetLimit
|
||||
* @param Collection $accounts
|
||||
|
||||
@@ -31,6 +31,8 @@ use Illuminate\Support\Collection;
|
||||
interface BudgetReportHelperInterface
|
||||
{
|
||||
/**
|
||||
* Generates the budget report.
|
||||
*
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param Collection $accounts
|
||||
@@ -40,6 +42,8 @@ interface BudgetReportHelperInterface
|
||||
public function getBudgetReport(Carbon $start, Carbon $end, Collection $accounts): array;
|
||||
|
||||
/**
|
||||
* Get budgets and the expenses in each budget.
|
||||
*
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param Collection $accounts
|
||||
|
||||
@@ -37,6 +37,8 @@ use Illuminate\Support\Collection;
|
||||
class PopupReport implements PopupReportInterface
|
||||
{
|
||||
/**
|
||||
* Collect the tranactions for one account and one budget.
|
||||
*
|
||||
* @param Budget $budget
|
||||
* @param Account $account
|
||||
* @param array $attributes
|
||||
@@ -53,6 +55,8 @@ class PopupReport implements PopupReportInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Collect the tranactions for one account and no budget.
|
||||
*
|
||||
* @param Account $account
|
||||
* @param array $attributes
|
||||
*
|
||||
@@ -72,6 +76,8 @@ class PopupReport implements PopupReportInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Collect the tranactions for a budget.
|
||||
*
|
||||
* @param Budget $budget
|
||||
* @param array $attributes
|
||||
*
|
||||
@@ -95,6 +101,8 @@ class PopupReport implements PopupReportInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Collect journals by a category.
|
||||
*
|
||||
* @param Category $category
|
||||
* @param array $attributes
|
||||
*
|
||||
@@ -112,6 +120,8 @@ class PopupReport implements PopupReportInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Group transactions by expense.
|
||||
*
|
||||
* @param Account $account
|
||||
* @param array $attributes
|
||||
*
|
||||
@@ -147,6 +157,8 @@ class PopupReport implements PopupReportInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Collect transactions by income.
|
||||
*
|
||||
* @param Account $account
|
||||
* @param array $attributes
|
||||
*
|
||||
|
||||
@@ -33,6 +33,8 @@ use Illuminate\Support\Collection;
|
||||
interface PopupReportInterface
|
||||
{
|
||||
/**
|
||||
* Get balances for budget.
|
||||
*
|
||||
* @param Budget $budget
|
||||
* @param Account $account
|
||||
* @param array $attributes
|
||||
@@ -42,6 +44,8 @@ interface PopupReportInterface
|
||||
public function balanceForBudget(Budget $budget, Account $account, array $attributes): Collection;
|
||||
|
||||
/**
|
||||
* Get balances for transactions without a budget.
|
||||
*
|
||||
* @param Account $account
|
||||
* @param array $attributes
|
||||
*
|
||||
@@ -50,6 +54,7 @@ interface PopupReportInterface
|
||||
public function balanceForNoBudget(Account $account, array $attributes): Collection;
|
||||
|
||||
/**
|
||||
* Group by budget.
|
||||
* @param Budget $budget
|
||||
* @param array $attributes
|
||||
*
|
||||
@@ -58,6 +63,8 @@ interface PopupReportInterface
|
||||
public function byBudget(Budget $budget, array $attributes): Collection;
|
||||
|
||||
/**
|
||||
* Group by category.
|
||||
*
|
||||
* @param Category $category
|
||||
* @param array $attributes
|
||||
*
|
||||
@@ -66,6 +73,8 @@ interface PopupReportInterface
|
||||
public function byCategory(Category $category, array $attributes): Collection;
|
||||
|
||||
/**
|
||||
* Do something with expense. Sorry, I am not very inspirational here.
|
||||
*
|
||||
* @param Account $account
|
||||
* @param array $attributes
|
||||
*
|
||||
@@ -74,6 +83,8 @@ interface PopupReportInterface
|
||||
public function byExpenses(Account $account, array $attributes): Collection;
|
||||
|
||||
/**
|
||||
* Do something with income. Sorry, I am not very inspirational here.
|
||||
*
|
||||
* @param Account $account
|
||||
* @param array $attributes
|
||||
*
|
||||
|
||||
@@ -38,7 +38,7 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
class ReportHelper implements ReportHelperInterface
|
||||
{
|
||||
/** @var BudgetRepositoryInterface */
|
||||
/** @var BudgetRepositoryInterface The budget repository */
|
||||
protected $budgetRepository;
|
||||
|
||||
/**
|
||||
@@ -118,6 +118,8 @@ class ReportHelper implements ReportHelperInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a list of months for the report.
|
||||
*
|
||||
* @param Carbon $date
|
||||
*
|
||||
* @return array
|
||||
|
||||
@@ -46,6 +46,8 @@ interface ReportHelperInterface
|
||||
public function getBillReport(Carbon $start, Carbon $end, Collection $accounts): BillCollection;
|
||||
|
||||
/**
|
||||
* Generate a list of months.
|
||||
*
|
||||
* @param Carbon $date
|
||||
*
|
||||
* @return array
|
||||
|
||||
Reference in New Issue
Block a user