-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
chore: simplify ClassDefinitionFixer
#8868
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
chore: simplify ClassDefinitionFixer
#8868
Conversation
# Conflicts: # dev-tools/phpstan/baseline/_loader.php # dev-tools/phpstan/baseline/booleanNot.exprNotBoolean.php
# Conflicts: # dev-tools/phpstan/baseline/_loader.php # dev-tools/phpstan/baseline/booleanNot.exprNotBoolean.php # dev-tools/phpstan/baseline/offsetAccess.notFound.php # dev-tools/phpstan/baseline/preInc.nonNumeric.php # dev-tools/phpstan/baseline/return.type.php
# Conflicts: # dev-tools/phpstan/baseline/return.type.php
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.
Pull Request Overview
This PR simplifies the ClassDefinitionFixer
by consolidating type definitions and unifying the inheritance tracking approach. The main purpose is to reduce complexity by replacing separate type definitions for extends and implements functionality with a single unified type.
Key changes include:
- Unified type definitions from separate
_ClassExtendsInfo
and_ClassImplementsInfo
to a single_ClassReferenceInfo
- Standardized property names from
numberOfExtends
/numberOfImplements
tocount
- Simplified method signatures by removing redundant label parameters
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/Fixer/ClassNotation/ClassDefinitionFixer.php | Core implementation changes unifying type definitions and simplifying the inheritance tracking logic |
tests/Fixer/ClassNotation/ClassDefinitionFixerTest.php | Test updates to match the new unified API and property naming |
dev-tools/phpstan/baseline/return.type.php | Removed PHPStan baseline errors that are now resolved |
dev-tools/phpstan/baseline/preInc.nonNumeric.php | Removed entire baseline file as errors are resolved |
dev-tools/phpstan/baseline/offsetAccess.notFound.php | Removed offset access errors that are now resolved |
dev-tools/phpstan/baseline/booleanNot.exprNotBoolean.php | Removed entire baseline file as errors are resolved |
dev-tools/phpstan/baseline/_loader.php | Updated loader to exclude resolved baseline files |
No description provided.