Docs: improve consistency and specificity #826
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
This Monday, PHPStan 2.0 will be released.
I've done some preliminary scans with PHPStan 2.0-dev to check if this would have an impact on this codebase.
Based on that, the changes made in commits 12154a6 and b95dde7 are necessary to prevent the CI builds from failing once PHPStan 2.0 comes out.
As I was looking through the doc type declarations anyway, I've enhanced a significant number of other
array
types as well, though there is more to be done still.Commits
Docs: improve consistency and specificity [1]
This fixes up the
@return
type declarations for allregister()
methods.Docs: improve consistency and specificity [2]
This fixes up the
@var
type declarations for allAbstractFunctionParameterSniff::$target_functions
properties.Docs: improve consistency and specificity [3]
This fixes up the
@return
type declarations for allAbstractVariableRestrictionsSniff::getGroups()
methods.Docs: improve consistency and specificity [4]
This fixes up the
@return
type declarations for allAbstractArrayAssignmentRestrictionsSniff::getGroups()
methods.DeclarationCompatibility::$checkClasses: improve type specificity
Docs: improve specificity
Miscellaneous other doc specificity fixes.
Note: this doesn't fix everything throughout the codebase, but is an iteration to improve things nonetheless.