Clean up repository.

This commit is contained in:
James Cole
2016-05-01 07:09:58 +02:00
parent bfa7ee90f4
commit ac8ff4e565
4 changed files with 35 additions and 26 deletions

View File

@@ -16,6 +16,8 @@ interface PiggyBankRepositoryInterface
{
/**
* Create a new event.
*
* @param PiggyBank $piggyBank
* @param string $amount
*
@@ -24,6 +26,8 @@ interface PiggyBankRepositoryInterface
public function createEvent(PiggyBank $piggyBank, string $amount): PiggyBankEvent;
/**
* Destroy piggy bank.
*
* @param PiggyBank $piggyBank
*
* @return bool
@@ -31,13 +35,8 @@ interface PiggyBankRepositoryInterface
public function destroy(PiggyBank $piggyBank): bool;
/**
* @param PiggyBank $piggyBank
* Get all events.
*
* @return Collection
*/
public function getEventSummarySet(PiggyBank $piggyBank) : Collection;
/**
* @param PiggyBank $piggyBank
*
* @return Collection
@@ -45,11 +44,15 @@ interface PiggyBankRepositoryInterface
public function getEvents(PiggyBank $piggyBank) : Collection;
/**
* Highest order of all piggy banks.
*
* @return int
*/
public function getMaxOrder(): int;
/**
* Return all piggy banks.
*
* @return Collection
*/
public function getPiggyBanks() : Collection;
@@ -62,8 +65,7 @@ interface PiggyBankRepositoryInterface
public function reset(): bool;
/**
*
* set id of piggy bank.
* Set specific piggy bank to specific order.
*
* @param int $piggyBankId
* @param int $order
@@ -74,6 +76,8 @@ interface PiggyBankRepositoryInterface
/**
* Store new piggy bank.
*
* @param array $data
*
* @return PiggyBank
@@ -81,6 +85,8 @@ interface PiggyBankRepositoryInterface
public function store(array $data): PiggyBank;
/**
* Update existing piggy bank.
*
* @param PiggyBank $piggyBank
* @param array $data
*