Code cleanup.

This commit is contained in:
James Cole
2016-05-01 09:42:08 +02:00
parent ac8ff4e565
commit c66df3cb2c
6 changed files with 87 additions and 179 deletions

View File

@@ -18,6 +18,8 @@ use Illuminate\Support\Collection;
interface JournalRepositoryInterface
{
/**
* Deletes a journal.
*
* @param TransactionJournal $journal
*
* @return bool
@@ -25,6 +27,8 @@ interface JournalRepositoryInterface
public function delete(TransactionJournal $journal): bool;
/**
* Find a specific journal
*
* @param int $journalId
*
* @return TransactionJournal
@@ -32,13 +36,17 @@ interface JournalRepositoryInterface
public function find(int $journalId) : TransactionJournal;
/**
* Get users first transaction journal
* Get users very first transaction journal
*
* @return TransactionJournal
*/
public function first(): TransactionJournal;
/**
* Returns the amount in the account before the specified transaction took place.
*
* @deprecated
*
* @param TransactionJournal $journal
* @param Transaction $transaction
*
@@ -46,22 +54,6 @@ interface JournalRepositoryInterface
*/
public function getAmountBefore(TransactionJournal $journal, Transaction $transaction): string;
/**
* @param array $types
* @param int $offset
* @param int $count
*
* @return Collection
*/
public function getCollectionOfTypes(array $types, int $offset, int $count):Collection;
/**
* @param TransactionType $dbType
*
* @return Collection
*/
public function getJournalsOfType(TransactionType $dbType): Collection;
/**
* @param array $types
* @param int $page
@@ -69,31 +61,7 @@ interface JournalRepositoryInterface
*
* @return LengthAwarePaginator
*/
public function getJournalsOfTypes(array $types, int $page, int $pageSize = 50): LengthAwarePaginator;
/**
* @param string $type
*
* @return TransactionType
*/
public function getTransactionType(string $type): TransactionType;
/**
* @param int $journalId
* @param Carbon $date
*
* @return TransactionJournal
*/
public function getWithDate(int $journalId, Carbon $date): TransactionJournal;
/**
*
* @param TransactionJournal $journal
* @param array $array
*
* @return bool
*/
public function saveTags(TransactionJournal $journal, array $array): bool;
public function getJournals(array $types, int $page, int $pageSize = 50): LengthAwarePaginator;
/**
* @param array $data
@@ -110,11 +78,4 @@ interface JournalRepositoryInterface
*/
public function update(TransactionJournal $journal, array $data): TransactionJournal;
/**
* @param TransactionJournal $journal
* @param array $array
*
* @return bool
*/
public function updateTags(TransactionJournal $journal, array $array): bool;
}