Skip to content

Run RemoveParamDescriptionDuplicateNameFixer before NoSuperfluousPhpdocTagsFixer - #107

Merged
TomasVotruba merged 2 commits into
mainfrom
tv-noSuperfluous-after-removeParamDescription
Sep 30, 2026
Merged

TomasVotruba merged 2 commits into
mainfrom
tv-noSuperfluous-after-removeParamDescription

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

RemoveParamDescriptionDuplicateNameFixer extends AbstractDocBlockFixer (priority -37), so it ran after NoSuperfluousPhpdocTagsFixer (priority 6).

For a docblock like:

/**
 * @param string $name Name
 */
public function foo(string $name): void

NoSuperfluous ran first, saw the Name description and kept the tag. Then RemoveParamDescriptionDuplicateNameFixer stripped Name, leaving a bare superfluous @param string $name that nothing removed.

This bumps the fixer priority to 7 so it runs before NoSuperfluous. The description is stripped first, and the now-bare @param is dropped as superfluous.

Added an Issues test registering both fixers (plus NoEmptyPhpdocFixer) to lock the ordering and the fully cleaned output.

…ocTagsFixer

Bump the fixer priority to 7 so it strips a duplicate @PARAM description
before NoSuperfluousPhpdocTagsFixer runs. Previously NoSuperfluous ran first,
saw the description and kept the tag, leaving a bare superfluous @PARAM behind.
@TomasVotruba
TomasVotruba merged commit a53d137 into main Sep 30, 2026
18 checks passed
@TomasVotruba
TomasVotruba deleted the tv-noSuperfluous-after-removeParamDescription branch September 30, 2026 12:13
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