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

Support for numeric string in bc math #382

Merged

Conversation

aszenz
Copy link
Contributor

@aszenz aszenz commented Nov 26, 2020

@aszenz aszenz force-pushed the support-for-numeric-string-in-bc-math branch from 3f113ff to 459c058 Compare November 26, 2020 09:27
@ondrejmirtes
Copy link
Member

Hi, thank you, you need to update the tests: it's string&numeric and not numeric-string in the asserts. It's something I want to change in 1.0 later...

@@ -78,11 +82,12 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
*
* @param FuncCall $functionCall
* @param Scope $scope
* @return NullType|StringType|UnionType
* @return NullType|Type|UnionType
Copy link
Contributor Author

@aszenz aszenz Nov 26, 2020

Choose a reason for hiding this comment

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

I guess we can just use @return Type here since both NullType and UnionType extend Type.
Or is there a way to say tt's a String|AccessoryNumericStringType, the TypeCombinator::intersect function returns a generic Type though

Copy link
Member

Choose a reason for hiding this comment

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

Just Type should be here.

@ondrejmirtes ondrejmirtes merged commit db7af31 into phpstan:master Nov 26, 2020
@ondrejmirtes
Copy link
Member

Thank you!

@aszenz aszenz deleted the support-for-numeric-string-in-bc-math branch November 27, 2020 05:14
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