mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 18:54:58 +00:00 
			
		
		
		
	General cleanup and new (incomplete) tests.
This commit is contained in:
		| @@ -14,6 +14,11 @@ use Illuminate\Support\Collection; | ||||
|  */ | ||||
| interface BudgetRepositoryInterface | ||||
| { | ||||
|     /** | ||||
|      * @return void | ||||
|      */ | ||||
|     public function cleanupBudgets(); | ||||
|  | ||||
|     /** | ||||
|      * @param Budget $budget | ||||
|      * | ||||
| @@ -26,31 +31,14 @@ interface BudgetRepositoryInterface | ||||
|      */ | ||||
|     public function getActiveBudgets(); | ||||
|  | ||||
|     /** | ||||
|      * @return Collection | ||||
|      */ | ||||
|     public function getInactiveBudgets(); | ||||
|  | ||||
|     /** | ||||
|      * @return void | ||||
|      */ | ||||
|     public function cleanupBudgets(); | ||||
|  | ||||
|     /** | ||||
|      * @param Budget $budget | ||||
|      * @param Carbon $date | ||||
|      * | ||||
|      * @return float | ||||
|      */ | ||||
|     public function spentInMonth(Budget $budget, Carbon $date); | ||||
|  | ||||
|     /** | ||||
|      * @param Carbon $start | ||||
|      * @param Carbon $end | ||||
|      * | ||||
|      * @return Collection | ||||
|      */ | ||||
|     public function getWithoutBudget(Carbon $start, Carbon $end); | ||||
|     public function getBudgetLimitRepetitions(Budget $budget, Carbon $start, Carbon $end); | ||||
|  | ||||
|     /** | ||||
|      * @param Budget $budget | ||||
| @@ -59,6 +47,11 @@ interface BudgetRepositoryInterface | ||||
|      */ | ||||
|     public function getBudgetLimits(Budget $budget); | ||||
|  | ||||
|     /** | ||||
|      * @return Collection | ||||
|      */ | ||||
|     public function getBudgets(); | ||||
|  | ||||
|     /** | ||||
|      * @param Budget $budget | ||||
|      * @param Carbon $date | ||||
| @@ -68,28 +61,9 @@ interface BudgetRepositoryInterface | ||||
|     public function getCurrentRepetition(Budget $budget, Carbon $date); | ||||
|  | ||||
|     /** | ||||
|      * @param Budget $budget | ||||
|      * @param Carbon $date | ||||
|      * @param        $amount | ||||
|      * | ||||
|      * @return mixed | ||||
|      * @return Collection | ||||
|      */ | ||||
|     public function updateLimitAmount(Budget $budget, Carbon $date, $amount); | ||||
|  | ||||
|     /** | ||||
|      * @param array $data | ||||
|      * | ||||
|      * @return Budget | ||||
|      */ | ||||
|     public function store(array $data); | ||||
|  | ||||
|     /** | ||||
|      * @param Budget $budget | ||||
|      * @param array  $data | ||||
|      * | ||||
|      * @return Budget | ||||
|      */ | ||||
|     public function update(Budget $budget, array $data); | ||||
|     public function getInactiveBudgets(); | ||||
|  | ||||
|     /** | ||||
|      * Returns all the transaction journals for a limit, possibly limited by a limit repetition. | ||||
| @@ -102,4 +76,61 @@ interface BudgetRepositoryInterface | ||||
|      */ | ||||
|     public function getJournals(Budget $budget, LimitRepetition $repetition = null, $take = 50); | ||||
|  | ||||
|     /** | ||||
|      * @param Carbon $start | ||||
|      * @param Carbon $end | ||||
|      * | ||||
|      * @return Collection | ||||
|      */ | ||||
|     public function getWithoutBudget(Carbon $start, Carbon $end); | ||||
|  | ||||
|     /** | ||||
|      * @param Carbon $start | ||||
|      * @param Carbon $end | ||||
|      * | ||||
|      * @return mixed | ||||
|      */ | ||||
|     public function getWithoutBudgetSum(Carbon $start, Carbon $end); | ||||
|  | ||||
|     /** | ||||
|      * @param Budget $budget | ||||
|      * @param Carbon $date | ||||
|      * | ||||
|      * @return float | ||||
|      */ | ||||
|     public function spentInMonth(Budget $budget, Carbon $date); | ||||
|  | ||||
|     /** | ||||
|      * @param array $data | ||||
|      * | ||||
|      * @return Budget | ||||
|      */ | ||||
|     public function store(array $data); | ||||
|  | ||||
|     /** | ||||
|      * @param Budget $budget | ||||
|      * @param Carbon $start | ||||
|      * @param Carbon $end | ||||
|      * | ||||
|      * @return float | ||||
|      */ | ||||
|     public function sumBudgetExpensesInPeriod(Budget $budget, $start, $end); | ||||
|  | ||||
|     /** | ||||
|      * @param Budget $budget | ||||
|      * @param array  $data | ||||
|      * | ||||
|      * @return Budget | ||||
|      */ | ||||
|     public function update(Budget $budget, array $data); | ||||
|  | ||||
|     /** | ||||
|      * @param Budget $budget | ||||
|      * @param Carbon $date | ||||
|      * @param        $amount | ||||
|      * | ||||
|      * @return mixed | ||||
|      */ | ||||
|     public function updateLimitAmount(Budget $budget, Carbon $date, $amount); | ||||
|  | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user