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

Int and float toString() produces numeric-string #371

Merged
merged 2 commits into from Nov 11, 2020

Conversation

b1rdex
Copy link
Contributor

@b1rdex b1rdex commented Nov 11, 2020

This is for phpstan/phpstan#4005

@ondrejmirtes
Copy link
Member

Hi, this needs a regression test. Probably add a new dataProvider in NodeScopeResolverTest::testFileAsserts() and test that (string) $int and (string) $float return string&numeric.

@b1rdex
Copy link
Contributor Author

b1rdex commented Nov 11, 2020

@ondrejmirtes done

src/Type/Constant/ConstantIntegerType.php Outdated Show resolved Hide resolved
tests/PHPStan/Analyser/data/cast-to-numeric-string.php Outdated Show resolved Hide resolved
src/Type/Accessory/AccessoryNumericStringType.php Outdated Show resolved Hide resolved
@b1rdex
Copy link
Contributor Author

b1rdex commented Nov 11, 2020

@ondrejmirtes fixed

@ondrejmirtes ondrejmirtes merged commit 248a3ee into phpstan:master Nov 11, 2020
@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
2 participants