mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-17 07:08:19 +00:00
Code cleanup
This commit is contained in:
@@ -40,13 +40,13 @@ trait DateCalculation
|
||||
*/
|
||||
public function activeDaysLeft(Carbon $start, Carbon $end): int
|
||||
{
|
||||
$difference = (int)($start->diffInDays($end, true) + 1);
|
||||
$difference = (int) ($start->diffInDays($end, true) + 1);
|
||||
$today = today(config('app.timezone'))->startOfDay();
|
||||
if ($start->lte($today) && $end->gte($today)) {
|
||||
$difference = $today->diffInDays($end) + 1;
|
||||
}
|
||||
|
||||
return (int)(0 === $difference ? 1 : $difference);
|
||||
return (int) (0 === $difference ? 1 : $difference);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,7 +63,7 @@ trait DateCalculation
|
||||
$difference = $start->diffInDays($today, true) + 1;
|
||||
}
|
||||
|
||||
return (int)$difference;
|
||||
return (int) $difference;
|
||||
}
|
||||
|
||||
protected function calculateStep(Carbon $start, Carbon $end): string
|
||||
|
||||
Reference in New Issue
Block a user