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
PHP_INT_MAX isn't positive-int, but int #6968
Comments
I found these snippets: https://psalm.dev/r/6c3860181f<?php
usleep(PHP_INT_MAX);
|
See psalm/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/ConstFetchAnalyzer.php Lines 167 to 173 in 6f1d438
|
Good catch. Care to provide a PR? (I'm really curious about the use case if this is a legit piece of code :D) |
It's probably not, but (u)sleep is the most convenient function to reproduce psalm false positives with positive-int/int type, see #6966 :) |
It's a legit piece of code, yeah: revoltphp/event-loop@dc9fbe7 |
I opened a PR that may fix this: #7070 |
…-positive Fix #6968: PHP_INT_MAX isn't positive
https://psalm.dev/r/6c3860181f
The text was updated successfully, but these errors were encountered: