Phan/phpstan fixes
This commit is contained in:
1 parent
6d0e528c38
commit
bcdb877d90
3 files changed
+6
-8
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user