Skip to content

Cover RemoveDeadParamFixer for anonymous functions#43

Merged
TomasVotruba merged 1 commit into
mainfrom
remove-dead-param-anonymous-function-coverage
Jul 4, 2026
Merged

Cover RemoveDeadParamFixer for anonymous functions#43
TomasVotruba merged 1 commit into
mainfrom
remove-dead-param-anonymous-function-coverage

Conversation

@TomasVotruba

@TomasVotruba TomasVotruba commented Jul 4, 2026

Copy link
Copy Markdown
Member

The RemoveDeadParamFixer already removes dead @param $value lines (name, no type) from functions and methods. This also applies to anonymous functions — e.g. a docblock above $cleanup = function (...).

Adds a fixture proving the behavior for anonymous functions. No production code change needed — the fixer already handles it.

Example

-/**
- * @param $mappedFields
- * @param $fieldType
- */
 $cleanup = function (array &$mappedFields, string $fieldType) {
 };
  • phpstan ✅
  • rector ✅
  • check-cs ✅
  • phpunit (279) ✅

@TomasVotruba TomasVotruba merged commit 006dc86 into main Jul 4, 2026
7 checks passed
@TomasVotruba TomasVotruba deleted the remove-dead-param-anonymous-function-coverage branch July 4, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant