Skip to content

[Proposal]: IntegerRangeType #1725

Description

@norberttech

Describe the Proposal

PHPStan allows to define integer types as int<min,max>, would be nice to be able to do the same on the code level since currently there is no way to narrow the types when int<1, max> is required somewhere

API Adjustments

type_integer_range(1, PHP_INT_MAX) - integer<1, max>

Are you intenting to also work on proposed change?

None

Are you interested in sponsoring this change?

None

Integration & Dependencies

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

  • Status
    On Hold

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions