mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Some code cleanup [skip ci]
This commit is contained in:
parent
78deb1420d
commit
446eaf6588
@ -34,7 +34,7 @@ use Crypt;
|
||||
*/
|
||||
final class Entry
|
||||
{
|
||||
//@formatter:off
|
||||
// @formatter:off
|
||||
public $journal_id;
|
||||
public $date;
|
||||
public $description;
|
||||
@ -55,7 +55,7 @@ final class Entry
|
||||
public $budget_name;
|
||||
public $category_id;
|
||||
public $category_name;
|
||||
//@formatter:on
|
||||
// @formatter:on
|
||||
|
||||
/**
|
||||
* Entry constructor.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -73,6 +73,7 @@ return [
|
||||
'field_supports_markdown' => 'This field supports <a href="https://en.support.wordpress.com/markdown-quick-reference/">Markdown</a>.',
|
||||
|
||||
// repeat frequencies:
|
||||
'repeat_freq_yearly' => 'yearly',
|
||||
'repeat_freq_monthly' => 'monthly',
|
||||
'weekly' => 'weekly',
|
||||
'quarterly' => 'quarterly',
|
||||
|
Loading…
Reference in New Issue
Block a user