Code cleanup.

This commit is contained in:
James Cole
2016-01-01 13:54:23 +01:00
parent b415b6b043
commit 54ede8aa18
3 changed files with 184 additions and 23 deletions

View File

@@ -39,15 +39,6 @@ interface BudgetRepositoryInterface
*/
public function firstActivity(Budget $budget);
/**
* Get a collection of all the limit repetitions belonging to this $budget.
*
* @param Budget $budget
*
* @return Collection
*/
public function getBudgetReps(Budget $budget);
/**
* Returns the expenses for this budget grouped per month, with the date
* in "date" (a string, not a Carbon) and the amount in "dailyAmount".
@@ -76,6 +67,43 @@ interface BudgetRepositoryInterface
*/
public function spentPerDay(Budget $budget, Carbon $start, Carbon $end);
/**
* Returns an array with the following key:value pairs:
*
* yyyy-mm-dd:<amount>
*
* Where yyyy-mm-dd is the date and <amount> is the money spent using WITHDRAWALS in the $budget
* from the given users accounts..
*
* @param Budget $budget
* @param Collection $accounts
* @param Carbon $start
* @param Carbon $end
*
* @return array
*/
public function spentPerDayForAccounts(Budget $budget, Collection $accounts, Carbon $start, Carbon $end);
/**
* Returns an array with the following key:value pairs:
*
* yyyy-mm-dd:<array>
*
* That array contains:
*
* budgetid:<amount>
*
* Where yyyy-mm-dd is the date and <amount> is the money spent using WITHDRAWALS in the $budget
* from the given users accounts..
*
* @param Collection $accounts
* @param Carbon $start
* @param Carbon $end
*
* @return array
*/
public function spentAllPerDayForAccounts(Collection $accounts, Carbon $start, Carbon $end);
/**
* @param Budget $budget
*
@@ -143,6 +171,14 @@ interface BudgetRepositoryInterface
*/
public function getBudgetLimitRepetitions(Budget $budget, Carbon $start, Carbon $end);
/**
* @param Carbon $start
* @param Carbon $end
*
* @return Collection
*/
public function getAllBudgetLimitRepetitions(Carbon $start, Carbon $end);
/**
* @param Budget $budget
*