First new display of piggy bank reminders.

This commit is contained in:
James Cole
2015-03-06 17:23:29 +01:00
parent 9f23cffd1b
commit 3f716cc369
5 changed files with 181 additions and 79 deletions

View File

@@ -60,4 +60,37 @@ 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);
}