-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
More precise phpdocs #1058
base: master
Are you sure you want to change the base?
More precise phpdocs #1058
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the comments on #993 it was my understanding that we shouldn't change argument types to avoid BC breaks. Not sure to what degree this matters here.
you are right.. param types should only be done on new major versions. dropped the param type changes |
public int $line; | ||
/** @var int The 0-based starting position of the token (or -1 if unknown). */ | ||
/** @var int<-1, max> The 0-based starting position of the token (or -1 if unknown). */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these types match whatever phpstan specifies for the PhpToken class? As we may either use this class or PhpToken. Not sure which one phpstan would actually pick for analysis...
This PR was merged into the 1.x branch. Discussion ---------- More precise phpdocs in PhpToken analog nikic/PHP-Parser#1058 Commits ------- f160585 More precise phpdocs in PhpToken
also fixes a few PHPStan level 7 errors