You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// If given date is a DateTime object; check if it falls in the weekend
if (get_class($date) === 'DateTime') {
if (in_array($date->format('w'), $this->weekend_days)) {
return false;
}
}
the condition fails for any subclasses of DateTime (like the very popular Carbon class) which needlessly limits your APIs scope. Please consider the instanceof operator to allow for classes that derive from DateTime.
The text was updated successfully, but these errors were encountered:
Looking at
the condition fails for any subclasses of
DateTime
(like the very popular Carbon class) which needlessly limits your APIs scope. Please consider theinstanceof
operator to allow for classes that derive fromDateTime
.The text was updated successfully, but these errors were encountered: