mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-30 12:43:57 -06:00
Do loop instead of while loop [skip ci]
This commit is contained in:
parent
97c0fb389d
commit
fcdb6fd2a7
@ -556,13 +556,13 @@ class BillRepository implements BillRepositoryInterface
|
||||
}
|
||||
// find the most recent date for this bill NOT in the future. Cache this date:
|
||||
$start = clone $bill->date;
|
||||
Log::debug('Start is ' . $start->format('Y-m-d'));
|
||||
Log::debug('nextExpectedMatch: Start is ' . $start->format('Y-m-d'));
|
||||
|
||||
|
||||
while ($start <= $date) {
|
||||
// do loop instead of while loop:
|
||||
do {
|
||||
$start = Navigation::addPeriod($start, $bill->repeat_freq, $bill->skip);
|
||||
Log::debug('Start is now ' . $start->format('Y-m-d'));
|
||||
}
|
||||
} while ($start <= $date);
|
||||
|
||||
$end = Navigation::addPeriod($start, $bill->repeat_freq, $bill->skip);
|
||||
Log::debug('Final start is ' . $start->format('Y-m-d'));
|
||||
|
Loading…
Reference in New Issue
Block a user