Expanded reminders.

This commit is contained in:
James Cole
2015-03-07 09:21:06 +01:00
parent a60671d4c1
commit 93996ada96
13 changed files with 304 additions and 214 deletions

View File

@@ -37,14 +37,7 @@ interface PiggyBankRepositoryInterface
*/
public function createPiggyBankPart(array $data);
/**
* @param PiggyBank $piggyBank
* @param Carbon $currentStart
* @param Carbon $currentEnd
*
* @return Reminder
*/
public function createReminder(PiggyBank $piggyBank, Carbon $currentStart, Carbon $currentEnd);
/**
* @param array $data
@@ -60,37 +53,4 @@ interface PiggyBankRepositoryInterface
* @return PiggyBank
*/
public function update(PiggyBank $piggyBank, array $data);
/**
* Takes a reminder, finds the piggy bank and tells you what to do now.
* Aka how much money to put in.
*
* TODO the routine to calculate the number of reminders is probably the same
* routine as is used in the Reminders-middle ware and can be used again.
*
*
*
* @param Reminder $reminder
*
* @return string
*/
public function getReminderText(Reminder $reminder);
/**
* This routine will return an array consisting of two dates which indicate the start
* and end date for each reminder that this piggy bank will have, if the piggy bank has
* any reminders. For example:
*
* [12 mar - 15 mar]
* [15 mar - 18 mar]
*
* etcetera.
*
* Array is filled with tiny arrays with Carbon objects in them.
*
* @param PiggyBank $piggyBank
*
* @return array
*/
public function getReminderRanges(PiggyBank $piggyBank);
}