Fix nullable parameter in work-contract API (#4063)

This commit is contained in:
Kevin Papst
2023-05-26 18:39:44 +02:00
committed by GitHub
parent 2681b81990
commit b4a4d81ca8

View File

@@ -66,12 +66,12 @@ final class Month extends BaseMonth
return new Day($day);
}
public function getExpectedTime(\DateTimeInterface $until): int
public function getExpectedTime(?\DateTimeInterface $until = null): int
{
$time = 0;
foreach ($this->getDays() as $day) {
if ($until < $day->getDay()) {
if ($until !== null && $until < $day->getDay()) {
break;
}
if ($day->getWorkingTime() !== null) {