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

[WIP] Assert integer ranges #14

Closed
wants to merge 1 commit into from
Closed

[WIP] Assert integer ranges #14

wants to merge 1 commit into from

Conversation

pascalbaljet
Copy link
Collaborator

This is a proof-of-concept to add methods for integer ranges:

$variable = type($variable)->asPositiveInt();

First of all, do we want this? I'm thinking about methods like asNegativeInt(), asPositiveFloat(), asIntBetween(50, 100), etc.

@nunomaduro
Copy link
Member

I am not fan of those tbh. I would rather keep this only for native types.

@nunomaduro nunomaduro closed this Mar 30, 2024
@pascalbaljet pascalbaljet deleted the as-int-ranges branch April 3, 2024 07:25
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.

2 participants