mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Various code reshuffelling.
This commit is contained in:
@@ -39,28 +39,6 @@ use Illuminate\Support\Collection;
|
||||
*/
|
||||
interface RecurringRepositoryInterface
|
||||
{
|
||||
/**
|
||||
* Destroy all recurring transactions.
|
||||
*/
|
||||
public function destroyAll(): void;
|
||||
|
||||
/**
|
||||
* @param string $query
|
||||
* @param int $limit
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function searchRecurrence(string $query, int $limit): Collection;
|
||||
|
||||
/**
|
||||
* Calculate how many transactions are to be expected from this recurrence.
|
||||
*
|
||||
* @param Recurrence $recurrence
|
||||
* @param RecurrenceRepetition $repetition
|
||||
* @return int
|
||||
*/
|
||||
public function totalTransactions(Recurrence $recurrence, RecurrenceRepetition $repetition): int;
|
||||
|
||||
/**
|
||||
* Destroy a recurring transaction.
|
||||
*
|
||||
@@ -68,6 +46,11 @@ interface RecurringRepositoryInterface
|
||||
*/
|
||||
public function destroy(Recurrence $recurrence): void;
|
||||
|
||||
/**
|
||||
* Destroy all recurring transactions.
|
||||
*/
|
||||
public function destroyAll(): void;
|
||||
|
||||
/**
|
||||
* Returns all of the user's recurring transactions.
|
||||
*
|
||||
@@ -142,6 +125,7 @@ interface RecurringRepositoryInterface
|
||||
|
||||
/**
|
||||
* @param RecurrenceTransaction $transaction
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getPiggyBank(RecurrenceTransaction $transaction): ?int;
|
||||
@@ -179,8 +163,8 @@ interface RecurringRepositoryInterface
|
||||
* @param Carbon $date
|
||||
* @param int $count
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @return array
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function getXOccurrences(RecurrenceRepetition $repetition, Carbon $date, int $count): array;
|
||||
|
||||
@@ -192,13 +176,13 @@ interface RecurringRepositoryInterface
|
||||
*
|
||||
* @param RecurrenceRepetition $repetition
|
||||
* @param Carbon $date
|
||||
* @param Carbon $afterDate
|
||||
* @param Carbon $afterDate
|
||||
* @param int $count
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @return array
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function getXOccurrencesSince(RecurrenceRepetition $repetition, Carbon $date,Carbon $afterDate, int $count): array;
|
||||
public function getXOccurrencesSince(RecurrenceRepetition $repetition, Carbon $date, Carbon $afterDate, int $count): array;
|
||||
|
||||
/**
|
||||
* Parse the repetition in a string that is user readable.
|
||||
@@ -209,6 +193,14 @@ interface RecurringRepositoryInterface
|
||||
*/
|
||||
public function repetitionDescription(RecurrenceRepetition $repetition): string;
|
||||
|
||||
/**
|
||||
* @param string $query
|
||||
* @param int $limit
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function searchRecurrence(string $query, int $limit): Collection;
|
||||
|
||||
/**
|
||||
* Set user for in repository.
|
||||
*
|
||||
@@ -220,11 +212,22 @@ interface RecurringRepositoryInterface
|
||||
* Store a new recurring transaction.
|
||||
*
|
||||
* @param array $data
|
||||
* @throws FireflyException
|
||||
*
|
||||
* @return Recurrence
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function store(array $data): Recurrence;
|
||||
|
||||
/**
|
||||
* Calculate how many transactions are to be expected from this recurrence.
|
||||
*
|
||||
* @param Recurrence $recurrence
|
||||
* @param RecurrenceRepetition $repetition
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function totalTransactions(Recurrence $recurrence, RecurrenceRepetition $repetition): int;
|
||||
|
||||
/**
|
||||
* Update a recurring transaction.
|
||||
*
|
||||
|
Reference in New Issue
Block a user