Normalize and fix phpdoc typehints across the code #3256
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.
While writing my own github actions reporter format (to get annotations properly in github), I noticed that my PHPStan was complaining about types in some of the PHP_CodeSniffer code. As a result I noticed that there were several issues when it came to phpdoc types in the code base.
This PR introduces bunch of normalization and fixes to the type hints in the phpdocs of various methods. I tried to normalize the types to what was already the most common format. The following changes have been applied:
boolean
have been replaced withbool
integer
have been replaced withint
\PHP_CodeSniffer\File
have been fixed to the correct type\PHP_CodeSniffer\Files\File
File
have been replaced with\PHP_CodeSniffer\Files\File
since rest of the code base used FQCNs exclusivelyI have not touched any actual code. Only phpdoc comments. Additionally, this PR does not modify any files in test directories, only those that are part of the actual code.