Skip to content

Conversation

gharlan
Copy link
Member

@gharlan gharlan commented Jul 20, 2025

No description provided.

@coveralls
Copy link

coveralls commented Jul 20, 2025

Coverage Status

coverage: 94.756%. remained the same
when pulling dd53de9 on gharlan:ClassDefinitionFixer-simplify
into 48fcf79 on PHP-CS-Fixer:master.

gharlan added 4 commits July 20, 2025 14:52
# 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
@keradus keradus requested a review from Copilot July 20, 2025 16:47
Copy link
Contributor

@Copilot Copilot AI left a 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 to count
  • 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

@kubawerlos kubawerlos merged commit 6bf1556 into PHP-CS-Fixer:master Jul 20, 2025
31 checks passed
@gharlan gharlan deleted the ClassDefinitionFixer-simplify branch July 20, 2025 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants