mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-06 12:45:30 +00:00
Clean up code
This commit is contained in:
@@ -48,15 +48,15 @@ class BillDateCalculator
|
|||||||
Log::debug(sprintf('Dates must be between %s and %s.', $earliest->format('Y-m-d'), $latest->format('Y-m-d')));
|
Log::debug(sprintf('Dates must be between %s and %s.', $earliest->format('Y-m-d'), $latest->format('Y-m-d')));
|
||||||
Log::debug(sprintf('Bill started on %s, period is "%s", skip is %d, last paid = "%s".', $billStart->format('Y-m-d'), $period, $skip, $lastPaid?->format('Y-m-d')));
|
Log::debug(sprintf('Bill started on %s, period is "%s", skip is %d, last paid = "%s".', $billStart->format('Y-m-d'), $period, $skip, $lastPaid?->format('Y-m-d')));
|
||||||
|
|
||||||
$daysUntilEOM = app('navigation')->daysUntilEndOfMonth($billStart);
|
$daysUntilEOM = app('navigation')->daysUntilEndOfMonth($billStart);
|
||||||
Log::debug(sprintf('For bill start, days until end of month is %d', $daysUntilEOM));
|
Log::debug(sprintf('For bill start, days until end of month is %d', $daysUntilEOM));
|
||||||
|
|
||||||
$set = new Collection();
|
$set = new Collection();
|
||||||
$currentStart = clone $earliest;
|
$currentStart = clone $earliest;
|
||||||
|
|
||||||
// 2023-06-23 subDay to fix 7655
|
// 2023-06-23 subDay to fix 7655
|
||||||
$currentStart->subDay();
|
$currentStart->subDay();
|
||||||
$loop = 0;
|
$loop = 0;
|
||||||
|
|
||||||
Log::debug('Start of loop');
|
Log::debug('Start of loop');
|
||||||
while ($currentStart <= $latest) {
|
while ($currentStart <= $latest) {
|
||||||
@@ -116,7 +116,7 @@ class BillDateCalculator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Log::debug('end of loop');
|
Log::debug('end of loop');
|
||||||
$simple = $set->map(
|
$simple = $set->map(
|
||||||
static function (Carbon $date) {
|
static function (Carbon $date) {
|
||||||
return $date->format('Y-m-d');
|
return $date->format('Y-m-d');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user