Skip to content

Conversation

mvorisek
Copy link
Contributor

@mvorisek mvorisek commented Apr 5, 2025

@mvorisek mvorisek changed the base branch from 2.1.x to 1.12.x April 5, 2025 15:32
@mvorisek mvorisek changed the title Fix DateTime::format('u') for math Fix DateTime::format('u') Apr 5, 2025
@mvorisek mvorisek changed the title Fix DateTime::format('u') Fix DateTime::format('u') return type Apr 5, 2025
@mvorisek mvorisek marked this pull request as ready for review April 5, 2025 15:43
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

case 'u':
return $useMicrosec
? new IntersectionType([new StringType(), new AccessoryNonFalsyStringType()])
? new IntersectionType([new StringType(), new AccessoryNumericStringType()])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the non-falsy type as well. Also, you could add type inference for v.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@mvorisek mvorisek marked this pull request as draft April 5, 2025 15:51
@mvorisek mvorisek force-pushed the dt_micros branch 2 times, most recently from cff8270 to 23515db Compare April 5, 2025 16:48
@mvorisek mvorisek marked this pull request as ready for review April 5, 2025 17:09
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@ondrejmirtes ondrejmirtes merged commit 50ef61e into phpstan:1.12.x Apr 5, 2025
453 checks passed
@ondrejmirtes
Copy link
Member

Thank you.

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.

3 participants