Skip to content

[Proposal]: IntegerRangeType #1725

Open
@norberttech

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

On Hold

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions