Skip to content

Type a ranged value for filter_var(FILTER_VALIDATE_INT)#1443

Merged
ondrejmirtes merged 6 commits intophpstan:1.7.xfrom
zonuexe:feature/typing-filter_var-range
Jun 22, 2022
Merged

Type a ranged value for filter_var(FILTER_VALIDATE_INT)#1443
ondrejmirtes merged 6 commits intophpstan:1.7.xfrom
zonuexe:feature/typing-filter_var-range

Conversation

@zonuexe
Copy link
Copy Markdown
Contributor

@zonuexe zonuexe commented Jun 19, 2022

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't plan to use it immediately, but it is possible to make FloatRangeType with -INF <= float <= INF.

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.

$type->isString()->yes()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed e301f6d

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.

TypeCombinator::intersect() instead please

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed fec2ef6

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.

TypeCombinator::union() please

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.

IntegerRangeType::fromInterval() please

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed 09ae197

@zonuexe zonuexe requested a review from ondrejmirtes June 20, 2022 16:40
@ondrejmirtes ondrejmirtes merged commit 79e18f3 into phpstan:1.7.x Jun 22, 2022
@ondrejmirtes
Copy link
Copy Markdown
Member

Thank you!

@zonuexe zonuexe deleted the feature/typing-filter_var-range branch June 22, 2022 16:19
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.

Typing filter_var(FILTER_VALIDATE_INT) when specified min_range and/or max_range

2 participants