Fix nullable parameter in work-contract API (#4063)
This commit is contained in:
@@ -66,12 +66,12 @@ final class Month extends BaseMonth
|
|||||||
return new Day($day);
|
return new Day($day);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getExpectedTime(\DateTimeInterface $until): int
|
public function getExpectedTime(?\DateTimeInterface $until = null): int
|
||||||
{
|
{
|
||||||
$time = 0;
|
$time = 0;
|
||||||
|
|
||||||
foreach ($this->getDays() as $day) {
|
foreach ($this->getDays() as $day) {
|
||||||
if ($until < $day->getDay()) {
|
if ($until !== null && $until < $day->getDay()) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ($day->getWorkingTime() !== null) {
|
if ($day->getWorkingTime() !== null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user