-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Version 3.0 #1
Conversation
src/Filter/DateTime.php
Outdated
*/ | ||
public static function format(DateTimeInterface $dateTime, string $format = 'c') : string | ||
{ | ||
if (!is_string($format) || trim($format) === '') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The is_string
check is useless
src/Filter/DateTime.php
Outdated
throw new FilterException('$value is not a non-empty string'); | ||
} | ||
|
||
return new \DateTime($value, $timezone); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should be consistant with the \DateTime
class. You are aliasing it as DateTimeStandard
but using \DateTime
here.
src/Filter/DateTimeZone.php
Outdated
* | ||
* @return \DateTimeZone|null | ||
* | ||
* @throws \InvalidArgumentException Thrown if $allowNull was not a boolean value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should no longer be thrown
No description provided.