Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Expand documentation for Helper directory.
James Cole10492e3b2f13
diff --git a/app/Helpers/Chart/MetaPieChart.php b/app/Helpers/Chart/MetaPieChart.phpindex e7326b9d35..d8e1065d3f 100644--- a/app/Helpers/Chart/MetaPieChart.php+++ b/app/Helpers/Chart/MetaPieChart.php@@ -45,7 +45,7 @@ use Steam;*/class MetaPieChart implements MetaPieChartInterface{- /** @var array */+ /** @var array The ways to group transactions, given the type of chart. */static protected $grouping= ['account' => ['opposing_account_id'],@@ -53,17 +53,17 @@ class MetaPieChart implements MetaPieChartInterface'category' => ['transaction_journal_category_id', 'transaction_category_id'],'tag' => [],];- /** @var Collection */+ /** @var Collection Involved accounts. */protected $accounts;- /** @var Collection */+ /** @var Collection The budgets. */protected $budgets;- /** @var Collection */+ /** @var Collection The categories. */protected $categories;- /** @var bool */+ /** @var bool Collect other objects. */protected $collectOtherObjects = false;- /** @var Carbon */+ /** @var Carbon The end date./ */protected $end;- /** @var array */+ /** @var array The repositories. */protected $repositories= ['account' => AccountRepositoryInterface::class,@@ -71,13 +71,13 @@ class MetaPieChart implements MetaPieChartInterface'category' => CategoryRepositoryInterface::class,'tag' => TagRepositoryInterface::class,];- /** @var Carbon */+ /** @var Carbon The start date. */protected $start;- /** @var Collection */+ /** @var Collection The involved tags/ */protected $tags;- /** @var string */+ /** @var string The total amount. */protected $total = '0';- /** @var User */+ /** @var User The user. */protected $user;/**@@ -92,6 +92,8 @@ class MetaPieChart implements MetaPieChartInterface}/**+ * Generate the chart.+ ** @param string $direction* @param string $group*@@ -134,6 +136,8 @@ class MetaPieChart implements MetaPieChartInterface}/**+ * Accounts setter.+ ** @codeCoverageIgnore** @param Collection $accounts@@ -148,6 +152,8 @@ class MetaPieChart implements MetaPieChartInterface}/**+ * Budgets setter.+ ** @codeCoverageIgnore** @param Collection $budgets@@ -162,6 +168,8 @@ class MetaPieChart implements MetaPieChartInterface}/**+ * Categories setter.+ ** @codeCoverageIgnore** @param Collection $categories@@ -176,6 +184,8 @@ class MetaPieChart implements MetaPieChartInterface}/**+ * Set if other objects should be collected.+ ** @codeCoverageIgnore** @param bool $collectOtherObjects@@ -190,6 +200,8 @@ class MetaPieChart implements MetaPieChartInterface}/**+ * Set the end date.+ ** @codeCoverageIgnore** @param Carbon $end@@ -204,6 +216,8 @@ class MetaPieChart implements MetaPieChartInterface}/**+ * Set the start date.+ ** @codeCoverageIgnore** @param Carbon $start@@ -218,6 +232,8 @@ class MetaPieChart implements MetaPieChartInterface}/**+ * Set the tags.+ ** @codeCoverageIgnore** @param Collection $tags@@ -232,6 +248,8 @@ class MetaPieChart implements MetaPieChartInterface}/**+ * Set the user.+ ** @codeCoverageIgnore** @param User $user@@ -246,6 +264,8 @@ class MetaPieChart implements MetaPieChartInterface}/**+ * Get all transactions.+ ** @param string $direction** @return Collection@@ -289,6 +309,8 @@ class MetaPieChart implements MetaPieChartInterface}/**+ * Group by a specific field.+ ** @param Collection $set* @param array $fields*@@ -323,6 +345,8 @@ class MetaPieChart implements MetaPieChartInterface}/**+ * Organise by certain type.+ ** @param string $type* @param array $array*@@ -348,6 +372,8 @@ class MetaPieChart implements MetaPieChartInterface}/**+ * Group by tag (slightly different).+ ** @codeCoverageIgnore** @param Collection $setdiff --git a/app/Helpers/Chart/MetaPieChartInterface.php b/app/Helpers/Chart/MetaPieChartInterface.phpindex c57fe15ed6..d0246d89f0 100644--- a/app/Helpers/Chart/MetaPieChartInterface.php+++ b/app/Helpers/Chart/MetaPieChartInterface.php@@ -32,6 +32,8 @@ use Illuminate\Support\Collection;interface MetaPieChartInterface{/**+ * Generate a chart.+ ** @param string $direction* @param string $group*@@ -40,6 +42,8 @@ interface MetaPieChartInterfacepublic function generate(string $direction, string $group): array;/**+ * Accounts setter.+ ** @param Collection $accounts** @return MetaPieChartInterface@@ -47,6 +51,8 @@ interface MetaPieChartInterfacepublic function setAccounts(Collection $accounts): MetaPieChartInterface;/**+ * Budgets setter.+ ** @param Collection $budgets** @return MetaPieChartInterface@@ -54,6 +60,8 @@ interface MetaPieChartInterfacepublic function setBudgets(Collection $budgets): MetaPieChartInterface;/**+ * Categories setter.+ ** @param Collection $categories** @return MetaPieChartInterface@@ -61,6 +69,8 @@ interface MetaPieChartInterfacepublic function setCategories(Collection $categories): MetaPieChartInterface;/**+ * Set if other objects should be collected.+ ** @param bool $collectOtherObjects** @return MetaPieChartInterface@@ -68,6 +78,8 @@ interface MetaPieChartInterfacepublic function setCollectOtherObjects(bool $collectOtherObjects): MetaPieChartInterface;/**+ * Set the end date.+ ** @param Carbon $end** @return MetaPieChartInterface@@ -75,6 +87,8 @@ interface MetaPieChartInterfacepublic function setEnd(Carbon $end): MetaPieChartInterface;/**+ * Set the start date.+ ** @param Carbon $start** @return MetaPieChartInterface@@ -82,6 +96,8 @@ interface MetaPieChartInterfacepublic function setStart(Carbon $start): MetaPieChartInterface;/**+ * Set the tags.+ ** @param Collection $tags** @return MetaPieChartInterface@@ -89,6 +105,8 @@ interface MetaPieChartInterfacepublic function setTags(Collection $tags): MetaPieChartInterface;/**+ * Set the user.+ ** @param User $user** @return MetaPieChartInterfacediff --git a/app/Helpers/Collection/Balance.php b/app/Helpers/Collection/Balance.phpindex c83e190ac8..b10674cefd 100644--- a/app/Helpers/Collection/Balance.php+++ b/app/Helpers/Collection/Balance.php@@ -29,14 +29,14 @@ use Illuminate\Support\Collection;*/class Balance{- /** @var BalanceHeader */+ /** @var BalanceHeader Header row. */protected $balanceHeader;- /** @var Collection */+ /** @var Collection Collection of lines. */protected $balanceLines;/**- *+ * Balance constructor.*/public function __construct(){@@ -44,6 +44,8 @@ class Balance}/**+ * Add a line.+ ** @param BalanceLine $line*/public function addBalanceLine(BalanceLine $line): void@@ -52,6 +54,8 @@ class Balance}/**+ * Get the header.+ ** @return BalanceHeader*/public function getBalanceHeader(): BalanceHeader@@ -60,6 +64,8 @@ class Balance}/**+ * Set the header.+ ** @param BalanceHeader $balanceHeader*/public function setBalanceHeader(BalanceHeader $balanceHeader): void@@ -68,6 +74,8 @@ class Balance}/**+ * Get all lines.+ ** @return Collection*/public function getBalanceLines(): Collection@@ -76,6 +84,8 @@ class Balance}/**+ * Set all lines.+ ** @param Collection $balanceLines*/public function setBalanceLines(Collection $balanceLines): voiddiff --git a/app/Helpers/Collection/BalanceEntry.php b/app/Helpers/Collection/BalanceEntry.phpindex 75ae5419b0..8f2e4fb195 100644--- a/app/Helpers/Collection/BalanceEntry.php+++ b/app/Helpers/Collection/BalanceEntry.php@@ -29,14 +29,16 @@ use FireflyIII\Models\Account as AccountModel;*/class BalanceEntry{- /** @var AccountModel */+ /** @var AccountModel The account. */protected $account;- /** @var string */+ /** @var string The amount left. */protected $left = '0';- /** @var string */+ /** @var string The amount spent. */protected $spent = '0';/**+ * Account getter.+ ** @return AccountModel*/public function getAccount(): AccountModel@@ -45,6 +47,8 @@ class BalanceEntry}/**+ * Account setter.+ ** @param AccountModel $account*/public function setAccount(AccountModel $account): void@@ -53,6 +57,8 @@ class BalanceEntry}/**+ * Get amount left.+ ** @return string*/public function getLeft(): string@@ -61,6 +67,8 @@ class BalanceEntry}/**+ * Set amount left.+ ** @param string $left*/public function setLeft(string $left): void@@ -69,6 +77,8 @@ class BalanceEntry}/**+ * Get amount spent.+ ** @return string*/public function getSpent(): string@@ -77,6 +87,8 @@ class BalanceEntry}/**+ * Set amount spent.+ ** @param string $spent*/public function setSpent(string $spent): voiddiff --git a/app/Helpers/Collection/BalanceHeader.php b/app/Helpers/Collection/BalanceHeader.phpindex e3e809b532..46c3091333 100644--- a/app/Helpers/Collection/BalanceHeader.php+++ b/app/Helpers/Collection/BalanceHeader.php@@ -30,11 +30,11 @@ use Illuminate\Support\Collection;*/class BalanceHeader{- /** @var Collection */+ /** @var Collection The accounts. */protected $accounts;/**- *+ * BalanceHeader constructor.*/public function __construct(){@@ -42,6 +42,8 @@ class BalanceHeader}/**+ * Add an account.+ ** @param AccountModel $account*/public function addAccount(AccountModel $account): void@@ -50,6 +52,8 @@ class BalanceHeader}/**+ * Get them all.+ ** @return Collection*/public function getAccounts(): Collectiondiff --git a/app/Helpers/Collection/Bill.php b/app/Helpers/Collection/Bill.phpindex c776819d84..9ce761345d 100644--- a/app/Helpers/Collection/Bill.php+++ b/app/Helpers/Collection/Bill.php@@ -32,17 +32,15 @@ use Log;*/class Bill{- /**- * @var Collection- */+ /** @var Collection The bills. */private $bills;- /** @var Carbon */+ /** @var Carbon End date of the collection. */private $endDate;- /** @var Carbon */+ /** @var Carbon Start date of the collection. */private $startDate;/**- *+ * Bill constructor.*/public function __construct(){@@ -50,6 +48,8 @@ class Bill}/**+ * Add a bill line.+ ** @param BillLine $bill*/public function addBill(BillLine $bill): void@@ -58,7 +58,7 @@ class Bill}/**- *+ * Filter the bills (yes how very descriptive).*/public function filterBills(): void{@@ -95,6 +95,8 @@ class Bill}/**+ * Bills getter.+ ** @return Collection*/public function getBills(): Collection@@ -112,6 +114,8 @@ class Bill}/**+ * End date setter.+ ** @param Carbon $endDate*/public function setEndDate(Carbon $endDate): void@@ -120,6 +124,8 @@ class Bill}/**+ * Start date setter.+ ** @param Carbon $startDate*/public function setStartDate(Carbon $startDate): voiddiff --git a/app/Helpers/Collection/BillLine.php b/app/Helpers/Collection/BillLine.phpindex c9341626ef..4be29cb07a 100644--- a/app/Helpers/Collection/BillLine.php+++ b/app/Helpers/Collection/BillLine.php@@ -30,23 +30,23 @@ use FireflyIII\Models\Bill as BillModel;*/class BillLine{- /** @var string */+ /** @var string The amount */protected $amount;- /** @var BillModel */+ /** @var BillModel The bill. */protected $bill;- /** @var bool */+ /** @var bool Is it hit this period */protected $hit;- /** @var string */+ /** @var string What was the max amount. */protected $max;- /** @var string */+ /** @var string What was the min amount. */protected $min;- /** @var Carbon */+ /** @var Carbon Latest date that payment is expected. */private $endOfPayDate;- /** @var Carbon */+ /** @var Carbon Date of last hit */private $lastHitDate;- /** @var Carbon */+ /** @var Carbon Date of last payment */private $payDate;- /** @var int */+ /** @var int Journal */private $transactionJournalId;/**@@ -58,6 +58,8 @@ class BillLine}/**+ * Amount getter.+ ** @return string*/public function getAmount(): string@@ -66,6 +68,8 @@ class BillLine}/**+ * Amount setter.+ ** @param string $amount*/public function setAmount(string $amount): void@@ -74,6 +78,8 @@ class BillLine}/**+ * Bill getter.+ ** @return BillModel*/public function getBill(): BillModel@@ -82,6 +88,8 @@ class BillLine}/**+ * Bill setter.+ ** @param BillModel $bill*/public function setBill(BillModel $bill): void@@ -90,6 +98,8 @@ class BillLine}/**+ * End of pay date getter.+ ** @return Carbon*/public function getEndOfPayDate(): Carbon@@ -98,6 +108,8 @@ class BillLine}/**+ * End of pay date setter.+ ** @param Carbon $endOfPayDate*/public function setEndOfPayDate(Carbon $endOfPayDate): void@@ -106,6 +118,8 @@ class BillLine}/**+ * Last hit date getter.+ ** @return Carbon*/public function getLastHitDate(): Carbon@@ -114,6 +128,8 @@ class BillLine}/**+ * Last hit date setter.+ ** @param Carbon $lastHitDate*/public function setLastHitDate(Carbon $lastHitDate): void@@ -122,6 +138,8 @@ class BillLine}/**+ * Max getter.+ ** @return string*/public function getMax(): string@@ -130,6 +148,8 @@ class BillLine}/**+ * Max setter.+ ** @param string $max*/public function setMax(string $max): void@@ -138,6 +158,8 @@ class BillLine}/**+ * Min getter.+ ** @return string*/public function getMin(): string@@ -146,6 +168,8 @@ class BillLine}/**+ * Min setter.+ ** @param string $min*/public function setMin(string $min): void@@ -154,6 +178,8 @@ class BillLine}/**+ * Pay date getter.+ ** @return Carbon*/public function getPayDate(): Carbon@@ -162,6 +188,8 @@ class BillLine}/**+ * Pay date setter.+ ** @param Carbon $payDate*/public function setPayDate(Carbon $payDate): void@@ -170,6 +198,8 @@ class BillLine}/**+ * Journal ID getter.+ ** @return int*/public function getTransactionJournalId(): int@@ -178,6 +208,8 @@ class BillLine}/**+ * Journal ID setter.+ ** @param int $transactionJournalId*/public function setTransactionJournalId(int $transactionJournalId): void@@ -186,6 +218,8 @@ class BillLine}/**+ * Is active.+ ** @return bool*/public function isActive(): bool@@ -194,6 +228,8 @@ class BillLine}/**+ * Is hit.+ ** @return bool*/public function isHit(): bool@@ -202,6 +238,8 @@ class BillLine}/**+ * Set is hit.+ ** @param bool $hit*/public function setHit(bool $hit): voiddiff --git a/app/Helpers/Collection/Category.php b/app/Helpers/Collection/Category.phpindex 93608a7f1d..9868bdb945 100644--- a/app/Helpers/Collection/Category.php+++ b/app/Helpers/Collection/Category.php@@ -30,13 +30,13 @@ use Illuminate\Support\Collection;*/class Category{- /** @var Collection */+ /** @var Collection The categories */protected $categories;- /** @var string */+ /** @var string Total amount */protected $total = '0';/**- *+ * Category constructor.*/public function __construct(){@@ -44,6 +44,8 @@ class Category}/**+ * Add a category.+ ** @param CategoryModel $category*/public function addCategory(CategoryModel $category): void@@ -56,6 +58,8 @@ class Category}/**+ * Add to the total amount.+ ** @param string $add*/public function addTotal(string $add): void@@ -64,6 +68,8 @@ class Category}/**+ * Get all categories.+ ** @return Collection*/public function getCategories(): Collection@@ -78,6 +84,8 @@ class Category}/**+ * Get the total.+ ** @return string*/public function getTotal(): stringdiff --git a/app/Helpers/Collector/JournalCollectorInterface.php b/app/Helpers/Collector/JournalCollectorInterface.phpindex b9c29ff4bf..bb42ea69de 100644--- a/app/Helpers/Collector/JournalCollectorInterface.php+++ b/app/Helpers/Collector/JournalCollectorInterface.php@@ -38,6 +38,8 @@ interface JournalCollectorInterface{/**+ * Add a specific filter.+ ** @param string $filter** @return JournalCollectorInterface@@ -45,6 +47,8 @@ interface JournalCollectorInterfacepublic function addFilter(string $filter): JournalCollectorInterface;/**+ * Get transactions with a specific amount.+ ** @param string $amount** @return JournalCollectorInterface@@ -52,6 +56,8 @@ interface JournalCollectorInterfacepublic function amountIs(string $amount): JournalCollectorInterface;/**+ * Get transactions where the amount is less than.+ ** @param string $amount** @return JournalCollectorInterface@@ -59,6 +65,8 @@ interface JournalCollectorInterfacepublic function amountLess(string $amount): JournalCollectorInterface;/**+ * Get transactions where the amount is more than.+ ** @param string $amount** @return JournalCollectorInterface@@ -66,31 +74,44 @@ interface JournalCollectorInterfacepublic function amountMore(string $amount): JournalCollectorInterface;/**+ * Count the result.+ ** @return int*/public function count(): int;/**+ * Get all journals.+ * TODO rename me.+ ** @return Collection*/public function getJournals(): Collection;/**+ * Get a paginated result.+ ** @return LengthAwarePaginator*/public function getPaginatedJournals(): LengthAwarePaginator;/**+ * Get the query.+ ** @return EloquentBuilder*/public function getQuery(): EloquentBuilder;/**+ * Set to ignore the cache.+ ** @return JournalCollectorInterface*/public function ignoreCache(): JournalCollectorInterface;/**+ * Remove a filter.+ ** @param string $filter** @return JournalCollectorInterface@@ -98,6 +119,8 @@ interface JournalCollectorInterfacepublic function removeFilter(string $filter): JournalCollectorInterface;/**+ * Set the accounts to collect from.+ ** @param Collection $accounts** @return JournalCollectorInterface@@ -105,6 +128,8 @@ interface JournalCollectorInterfacepublic function setAccounts(Collection $accounts): JournalCollectorInterface;/**+ * Collect journals after a specific date.+ ** @param Carbon $after** @return JournalCollectorInterface@@ -112,11 +137,15 @@ interface JournalCollectorInterfacepublic function setAfter(Carbon $after): JournalCollectorInterface;/**+ * Include all asset accounts.+ ** @return JournalCollectorInterface*/public function setAllAssetAccounts(): JournalCollectorInterface;/**+ * Collect journals before a specific date.+ ** @param Carbon $before** @return JournalCollectorInterface@@ -124,6 +153,8 @@ interface JournalCollectorInterfacepublic function setBefore(Carbon $before): JournalCollectorInterface;/**+ * Set the bills to filter on.+ ** @param Collection $bills** @return JournalCollectorInterface@@ -131,6 +162,8 @@ interface JournalCollectorInterfacepublic function setBills(Collection $bills): JournalCollectorInterface;/**+ * Set the budget to filter on.+ ** @param Budget $budget** @return JournalCollectorInterface@@ -138,6 +171,8 @@ interface JournalCollectorInterfacepublic function setBudget(Budget $budget): JournalCollectorInterface;/**+ * Set the budgets to filter on.+ ** @param Collection $budgets** @return JournalCollectorInterface@@ -145,6 +180,8 @@ interface JournalCollectorInterfacepublic function setBudgets(Collection $budgets): JournalCollectorInterface;/**+ * Set the categories to filter on.+ ** @param Collection $categories** @return JournalCollectorInterface@@ -152,6 +189,8 @@ interface JournalCollectorInterfacepublic function setCategories(Collection $categories): JournalCollectorInterface;/**+ * Set the category to filter on.+ ** @param Category $category** @return JournalCollectorInterface@@ -159,6 +198,8 @@ interface JournalCollectorInterfacepublic function setCategory(Category $category): JournalCollectorInterface;/**+ * Set the journals to filter on.+ ** @param Collection $journals** @return JournalCollectorInterface@@ -166,6 +207,8 @@ interface JournalCollectorInterfacepublic function setJournals(Collection $journals): JournalCollectorInterface;/**+ * Set the page limit.+ ** @param int $limit** @return JournalCollectorInterface@@ -173,6 +216,8 @@ interface JournalCollectorInterfacepublic function setLimit(int $limit): JournalCollectorInterface;/**+ * Set the offset.+ ** @param int $offset** @return JournalCollectorInterface@@ -180,6 +225,8 @@ interface JournalCollectorInterfacepublic function setOffset(int $offset): JournalCollectorInterface;/**+ * Set the opposing accounts to collect from.+ ** @param Collection $accounts** @return JournalCollectorInterface@@ -187,6 +234,8 @@ interface JournalCollectorInterfacepublic function setOpposingAccounts(Collection $accounts): JournalCollectorInterface;/**+ * Set the page to get.+ ** @param int $page** @return JournalCollectorInterface@@ -194,6 +243,8 @@ interface JournalCollectorInterfacepublic function setPage(int $page): JournalCollectorInterface;/**+ * Set the date range.+ ** @param Carbon $start* @param Carbon $end*@@ -202,6 +253,8 @@ interface JournalCollectorInterfacepublic function setRange(Carbon $start, Carbon $end): JournalCollectorInterface;/**+ * Set the tag to collect from.+ ** @param Tag $tag** @return JournalCollectorInterface@@ -209,6 +262,8 @@ interface JournalCollectorInterfacepublic function setTag(Tag $tag): JournalCollectorInterface;/**+ * Set the tags to collect from.+ ** @param Collection $tags** @return JournalCollectorInterface@@ -216,6 +271,8 @@ interface JournalCollectorInterfacepublic function setTags(Collection $tags): JournalCollectorInterface;/**+ * Set the types to collect.+ ** @param array $types** @return JournalCollectorInterface@@ -223,6 +280,8 @@ interface JournalCollectorInterfacepublic function setTypes(array $types): JournalCollectorInterface;/**+ * Set the user.+ ** @param User $user** @return mixed@@ -230,31 +289,41 @@ interface JournalCollectorInterfacepublic function setUser(User $user);/**- *+ * Start the query.*/public function startQuery();/**+ * Include budget information.+ ** @return JournalCollectorInterface*/public function withBudgetInformation(): JournalCollectorInterface;/**+ * Include category information.+ ** @return JournalCollectorInterface*/public function withCategoryInformation(): JournalCollectorInterface;/**+ * Include opposing account information.+ ** @return JournalCollectorInterface*/public function withOpposingAccount(): JournalCollectorInterface;/**+ * Include tranactions without a budget.+ ** @return JournalCollectorInterface*/public function withoutBudget(): JournalCollectorInterface;/**+ * Include tranactions without a category.+ ** @return JournalCollectorInterface*/public function withoutCategory(): JournalCollectorInterface;diff --git a/app/Helpers/Filter/AmountFilter.php b/app/Helpers/Filter/AmountFilter.phpindex c6530a129a..e977e4d0a0 100644--- a/app/Helpers/Filter/AmountFilter.php+++ b/app/Helpers/Filter/AmountFilter.php@@ -34,7 +34,7 @@ use Log;*/class AmountFilter implements FilterInterface{- /** @var int */+ /** @var int Either -1 or +1 for the filter. */private $modifier;/**@@ -48,6 +48,8 @@ class AmountFilter implements FilterInterface}/**+ * Filter on amount.+ ** @param Collection $set** @return Collectiondiff --git a/app/Helpers/Filter/CountAttachmentsFilter.php b/app/Helpers/Filter/CountAttachmentsFilter.phpindex 94a58c4bba..bcb61fa3c2 100644--- a/app/Helpers/Filter/CountAttachmentsFilter.php+++ b/app/Helpers/Filter/CountAttachmentsFilter.php@@ -36,6 +36,8 @@ class CountAttachmentsFilter implements FilterInterface{/**+ * Adds the number of transactions to each given transaction.+ ** @param Collection $set** @return Collectiondiff --git a/app/Helpers/Filter/EmptyFilter.php b/app/Helpers/Filter/EmptyFilter.phpindex 60c03d9769..2235fe2bfa 100644--- a/app/Helpers/Filter/EmptyFilter.php+++ b/app/Helpers/Filter/EmptyFilter.php@@ -30,6 +30,8 @@ use Illuminate\Support\Collection;class EmptyFilter implements FilterInterface{/**+ * Simply returns the set.+ ** @param Collection $set** @return Collectiondiff --git a/app/Helpers/Filter/FilterInterface.php b/app/Helpers/Filter/FilterInterface.phpindex e1ed2ed163..4b08036b51 100644--- a/app/Helpers/Filter/FilterInterface.php+++ b/app/Helpers/Filter/FilterInterface.php@@ -30,6 +30,8 @@ use Illuminate\Support\Collection;interface FilterInterface{/**+ * Apply the filter.+ ** @param Collection $set** @return Collectiondiff --git a/app/Helpers/Filter/InternalTransferFilter.php b/app/Helpers/Filter/InternalTransferFilter.phpindex cf163c1b57..1442db3d20 100644--- a/app/Helpers/Filter/InternalTransferFilter.php+++ b/app/Helpers/Filter/InternalTransferFilter.php@@ -35,7 +35,7 @@ use Log;*/class InternalTransferFilter implements FilterInterface{- /** @var array */+ /** @var array The accounts */private $accounts;/**@@ -49,6 +49,8 @@ class InternalTransferFilter implements FilterInterface}/**+ * See class description.+ ** @param Collection $set** @return Collectiondiff --git a/app/Helpers/Filter/NegativeAmountFilter.php b/app/Helpers/Filter/NegativeAmountFilter.phpindex 2eb266a07c..b6b0f10cf6 100644--- a/app/Helpers/Filter/NegativeAmountFilter.php+++ b/app/Helpers/Filter/NegativeAmountFilter.php@@ -34,6 +34,8 @@ use Log;class NegativeAmountFilter implements FilterInterface{/**+ * See class description.+ ** @param Collection $set** @return Collectiondiff --git a/app/Helpers/Filter/OpposingAccountFilter.php b/app/Helpers/Filter/OpposingAccountFilter.phpindex cdafd96fca..5df2170ce6 100644--- a/app/Helpers/Filter/OpposingAccountFilter.php+++ b/app/Helpers/Filter/OpposingAccountFilter.php@@ -34,7 +34,7 @@ use Log;*/class OpposingAccountFilter implements FilterInterface{- /** @var array */+ /** @var array The asset accounts. */private $accounts;/**@@ -48,6 +48,8 @@ class OpposingAccountFilter implements FilterInterface}/**+ * Only return specific transactions. See class description.+ ** @param Collection $set** @return Collectiondiff --git a/app/Helpers/Filter/PositiveAmountFilter.php b/app/Helpers/Filter/PositiveAmountFilter.phpindex 67d2f289d0..155c6c3f33 100644--- a/app/Helpers/Filter/PositiveAmountFilter.php+++ b/app/Helpers/Filter/PositiveAmountFilter.php@@ -37,6 +37,8 @@ use Log;class PositiveAmountFilter implements FilterInterface{/**+ * See class description.+ ** @param Collection $set** @return Collectiondiff --git a/app/Helpers/Filter/SplitIndicatorFilter.php b/app/Helpers/Filter/SplitIndicatorFilter.phpindex c85880e098..afc42c30c5 100644--- a/app/Helpers/Filter/SplitIndicatorFilter.php+++ b/app/Helpers/Filter/SplitIndicatorFilter.php@@ -35,6 +35,8 @@ class SplitIndicatorFilter implements FilterInterface{/**+ * Adds a property if the journal is a split one.+ ** @param Collection $set** @return Collectiondiff --git a/app/Helpers/Filter/TransactionViewFilter.php b/app/Helpers/Filter/TransactionViewFilter.phpindex 7d5bdb0b91..105226c88f 100644--- a/app/Helpers/Filter/TransactionViewFilter.php+++ b/app/Helpers/Filter/TransactionViewFilter.php@@ -39,6 +39,8 @@ use Log;class TransactionViewFilter implements FilterInterface{/**+ * See class description.+ ** @param Collection $set* @SuppressWarnings(PHPMD.CyclomaticComplexity)* @return Collectiondiff --git a/app/Helpers/Filter/TransferFilter.php b/app/Helpers/Filter/TransferFilter.phpindex 5a9cbb86df..38f4e888f0 100644--- a/app/Helpers/Filter/TransferFilter.php+++ b/app/Helpers/Filter/TransferFilter.php@@ -35,6 +35,8 @@ use Steam;class TransferFilter implements FilterInterface{/**+ * See class transaction.+ ** @param Collection $set** @return Collectiondiff --git a/app/Helpers/Help/Help.php b/app/Helpers/Help/Help.phpindex 3b8cce631b..818517d6f3 100644--- a/app/Helpers/Help/Help.php+++ b/app/Helpers/Help/Help.php@@ -35,14 +35,14 @@ use Route;*/class Help implements HelpInterface{- /**- *- */+ /** @var string The cache key */public const CACHEKEY = 'help_%s_%s';- /** @var string */+ /** @var string The user agent. */protected $userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36';/**+ * Get from cache.+ ** @param string $route* @param string $language*@@ -56,12 +56,14 @@ class Help implements HelpInterface}/**+ * Get text from GitHub.+ ** @param string $route* @param string $language** @return string*/- public function getFromGithub(string $route, string $language): string+ public function getFromGitHub(string $route, string $language): string{$uri = sprintf('https://raw.githubusercontent.com/firefly-iii/help/master/%s/%s.md', $language, $route);Log::debug(sprintf('Trying to get %s...', $uri));@@ -89,6 +91,8 @@ class Help implements HelpInterface}/**+ * Do we have the route?+ ** @param string $route** @return bool@@ -99,6 +103,8 @@ class Help implements HelpInterface}/**+ * Is in cache?+ ** @param string $route* @param string $language*@@ -119,6 +125,8 @@ class Help implements HelpInterface}/**+ * Put help text in cache.+ ** @param string $route* @param string $language* @param string $contentdiff --git a/app/Helpers/Help/HelpInterface.php b/app/Helpers/Help/HelpInterface.phpindex a74284a078..7962423d42 100644--- a/app/Helpers/Help/HelpInterface.php+++ b/app/Helpers/Help/HelpInterface.php@@ -28,6 +28,8 @@ namespace FireflyIII\Helpers\Help;interface HelpInterface{/**+ * Get the help text from cache.+ ** @param string $route* @param string $language*@@ -36,14 +38,18 @@ interface HelpInterfacepublic function getFromCache(string $route, string $language): string;/**+ * Get the help text from GitHub.+ ** @param string $route* @param string $language** @return string*/- public function getFromGithub(string $route, string $language): string;+ public function getFromGitHub(string $route, string $language): string;/**+ * Is the route a known route?+ ** @param string $route** @return bool@@ -51,6 +57,8 @@ interface HelpInterfacepublic function hasRoute(string $route): bool;/**+ * Is the help text in cache?+ ** @param string $route* @param string $language*@@ -59,6 +67,8 @@ interface HelpInterfacepublic function inCache(string $route, string $language): bool;/**+ * Put the result in cache.+ ** @param string $route* @param string $language* @param string $contentdiff --git a/app/Helpers/Report/BalanceReportHelper.php b/app/Helpers/Report/BalanceReportHelper.phpindex 09072bbb46..1daec53c1c 100644--- a/app/Helpers/Report/BalanceReportHelper.php+++ b/app/Helpers/Report/BalanceReportHelper.php@@ -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*diff --git a/app/Helpers/Report/BalanceReportHelperInterface.php b/app/Helpers/Report/BalanceReportHelperInterface.phpindex 820def7669..2a18d6abe9 100644--- a/app/Helpers/Report/BalanceReportHelperInterface.php+++ b/app/Helpers/Report/BalanceReportHelperInterface.php@@ -32,6 +32,8 @@ use Illuminate\Support\Collection;interface BalanceReportHelperInterface{/**+ * Generates the report (duh).+ ** @param Collection $accounts* @param Carbon $start* @param Carbon $enddiff --git a/app/Helpers/Report/BudgetReportHelper.php b/app/Helpers/Report/BudgetReportHelper.phpindex 66fa8bf1fa..aaa738effb 100644--- a/app/Helpers/Report/BudgetReportHelper.php+++ b/app/Helpers/Report/BudgetReportHelper.php@@ -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 $accountsdiff --git a/app/Helpers/Report/BudgetReportHelperInterface.php b/app/Helpers/Report/BudgetReportHelperInterface.phpindex 4b60e5e18f..b470265709 100644--- a/app/Helpers/Report/BudgetReportHelperInterface.php+++ b/app/Helpers/Report/BudgetReportHelperInterface.php@@ -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 BudgetReportHelperInterfacepublic 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 $accountsdiff --git a/app/Helpers/Report/PopupReport.php b/app/Helpers/Report/PopupReport.phpindex e0eccc2c62..c0dac93458 100644--- a/app/Helpers/Report/PopupReport.php+++ b/app/Helpers/Report/PopupReport.php@@ -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*diff --git a/app/Helpers/Report/PopupReportInterface.php b/app/Helpers/Report/PopupReportInterface.phpindex 6345afdcc3..4fa798f1ec 100644--- a/app/Helpers/Report/PopupReportInterface.php+++ b/app/Helpers/Report/PopupReportInterface.php@@ -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 PopupReportInterfacepublic 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 PopupReportInterfacepublic function balanceForNoBudget(Account $account, array $attributes): Collection;/**+ * Group by budget.* @param Budget $budget* @param array $attributes*@@ -58,6 +63,8 @@ interface PopupReportInterfacepublic function byBudget(Budget $budget, array $attributes): Collection;/**+ * Group by category.+ ** @param Category $category* @param array $attributes*@@ -66,6 +73,8 @@ interface PopupReportInterfacepublic 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 PopupReportInterfacepublic function byExpenses(Account $account, array $attributes): Collection;/**+ * Do something with income. Sorry, I am not very inspirational here.+ ** @param Account $account* @param array $attributes*diff --git a/app/Helpers/Report/ReportHelper.php b/app/Helpers/Report/ReportHelper.phpindex c690787630..8f1cad60b1 100644--- a/app/Helpers/Report/ReportHelper.php+++ b/app/Helpers/Report/ReportHelper.php@@ -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 arraydiff --git a/app/Helpers/Report/ReportHelperInterface.php b/app/Helpers/Report/ReportHelperInterface.phpindex 2d182cb6d8..703aa149a9 100644--- a/app/Helpers/Report/ReportHelperInterface.php+++ b/app/Helpers/Report/ReportHelperInterface.php@@ -46,6 +46,8 @@ interface ReportHelperInterfacepublic function getBillReport(Carbon $start, Carbon $end, Collection $accounts): BillCollection;/**+ * Generate a list of months.+ ** @param Carbon $date** @return array