Skip to content

Support for numeric string in bc math#382

Merged
ondrejmirtes merged 7 commits intophpstan:masterfrom
aszenz:support-for-numeric-string-in-bc-math
Nov 26, 2020
Merged

Support for numeric string in bc math#382
ondrejmirtes merged 7 commits intophpstan:masterfrom
aszenz:support-for-numeric-string-in-bc-math

Conversation

@aszenz
Copy link
Copy Markdown
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
Copy Markdown
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...

* @param FuncCall $functionCall
* @param Scope $scope
* @return NullType|StringType|UnionType
* @return NullType|Type|UnionType
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Development

Successfully merging this pull request may close these issues.

Support returning numeric-string for Bcmath functions

2 participants