Skip to content
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

Merged
merged 9 commits into from
Mar 6, 2018
Merged

[WIP] Version 3.0 #1

merged 9 commits into from
Mar 6, 2018

Conversation

hotline-emu
Copy link
Contributor

No description provided.

*/
public static function format(DateTimeInterface $dateTime, string $format = 'c') : string
{
if (!is_string($format) || trim($format) === '') {
Copy link
Contributor

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

throw new FilterException('$value is not a non-empty string');
}

return new \DateTime($value, $timezone);
Copy link
Contributor

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.

*
* @return \DateTimeZone|null
*
* @throws \InvalidArgumentException Thrown if $allowNull was not a boolean value.
Copy link
Contributor

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

@chadicus chadicus merged commit f9e60f1 into traderinteractive:master Mar 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants