Phan/phpstan fixes

This commit is contained in:
Clemens Schwaighofer committed 2022-07-29 11:06:53 +09:00
1 parent 6d0e528c38
commit bcdb877d90
3 files changed
+6 -8

No files matched your search

+3 -3
View File
@@ -209,7 +209,7 @@ class DateTime
if ($isodow < 1 || $isodow > 7) {
return $long ? 'Invalid' : 'Inv';
}
return date($long ? 'l' : 'D', strtotime("Sunday +{$isodow} days"));
return date($long ? 'l' : 'D', strtotime("Sunday +{$isodow} days") ?: null);
}
/**
@@ -224,7 +224,7 @@ class DateTime
if (!self::checkDate($date)) {
return $long ? 'Invalid' : 'Inv';
}
return date($long ? 'l' : 'D', strtotime($date));
return date($long ? 'l' : 'D', strtotime($date) ?: null);
}
/**
@@ -238,7 +238,7 @@ class DateTime
if (!self::checkDate($date)) {
return -1;
}
return (int)date('N', strtotime($date));
return (int)date('N', strtotime($date) ?: null);
}
/**