Some code cleanup [skip ci]

This commit is contained in:
James Cole
2016-10-23 14:58:39 +02:00
parent 78deb1420d
commit 446eaf6588
4 changed files with 3 additions and 50 deletions

View File

@@ -311,20 +311,6 @@ class BillRepository implements BillRepositoryInterface
return $paginator;
}
/**
* Get all journals that were recorded on this bill between these dates.
*
* @param Bill $bill
* @param Carbon $start
* @param Carbon $end
*
* @return Collection
*/
public function getJournalsInRange(Bill $bill, Carbon $start, Carbon $end): Collection
{
return $bill->transactionJournals()->before($end)->after($start)->get();
}
/**
* @param Bill $bill
*
@@ -466,21 +452,6 @@ class BillRepository implements BillRepositoryInterface
return $avg;
}
/**
* @param Bill $bill
*
* @return \Carbon\Carbon
*/
public function lastFoundMatch(Bill $bill): Carbon
{
$last = $bill->transactionJournals()->orderBy('date', 'DESC')->first();
if ($last) {
return $last->date;
}
return Carbon::now()->addDays(2); // in the future!
}
/**
* Given a bill and a date, this method will tell you at which moment this bill expects its next
* transaction. Whether or not it is there already, is not relevant.

View File

@@ -113,17 +113,6 @@ interface BillRepositoryInterface
*/
public function getJournals(Bill $bill, int $page, int $pageSize = 50): LengthAwarePaginator;
/**
* Get all journals that were recorded on this bill between these dates.
*
* @param Bill $bill
* @param Carbon $start
* @param Carbon $end
*
* @return Collection
*/
public function getJournalsInRange(Bill $bill, Carbon $start, Carbon $end): Collection;
/**
* @param Bill $bill
*
@@ -166,14 +155,6 @@ interface BillRepositoryInterface
*/
public function getYearAverage(Bill $bill, Carbon $date): string;
/**
* @param Bill $bill
*
* @return \Carbon\Carbon
*/
public function lastFoundMatch(Bill $bill): Carbon;
/**
* Given a bill and a date, this method will tell you at which moment this bill expects its next
* transaction. Whether or not it is there already, is not relevant.