Skip to content

Fix return type of round/ceil/floor in non strict type environment #3223

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

Merged

Conversation

BackEndTea
Copy link
Contributor

In non declare strict types the round functions are able to handle numeric strings, null and bools.

See also: https://3v4l.org/5io0n

And issue phpstan/phpstan#11319

@phpstan-bot
Copy link
Collaborator

You've opened the pull request against the latest branch 1.12.x. If your code is relevant on 1.11.x and you want it to be released sooner, please rebase your pull request and change its target to 1.11.x.

@BackEndTea BackEndTea force-pushed the round-type-non-declare-strict branch from f1611f7 to 458740e Compare July 11, 2024 08:32
@BackEndTea BackEndTea changed the base branch from 1.12.x to 1.11.x July 11, 2024 08:32
@BackEndTea BackEndTea force-pushed the round-type-non-declare-strict branch from 458740e to ff77af7 Compare July 11, 2024 08:38
In non declare strict types the round functions are able to handle numeric strings, null and bools.

See also: https://3v4l.org/5io0n

And issue phpstan/phpstan#11319
@BackEndTea BackEndTea force-pushed the round-type-non-declare-strict branch from ff77af7 to 34bbe41 Compare July 11, 2024 08:38
@ondrejmirtes ondrejmirtes merged commit b7e29bc into phpstan:1.11.x Jul 11, 2024
451 of 454 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

@BackEndTea
Copy link
Contributor Author

Thanks for the merge @ondrejmirtes !

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