Blink parity: process single-line docblocks in NoSuperfluousPhpdocTags - #147
Merged
Merged
Conversation
The fixer skipped single-line "/** ... */" docblocks, so a standalone "/** @inheritdoc */" (or a single-line superfluous tag) was kept and later expanded to multi-line instead of removed. php-cs-fixer processes both forms; blink now does too, removing the tag and leaving "/** */" for NoEmptyPhpdoc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Removes blink's single-line-docblock skip so laravel's pervasive
/** @inheritDoc */is handled like php-cs-fixer. Laravel: 120 -> 86 differing files (34 flipped); mautic unchanged (3).The issue
blink's
NoSuperfluousPhpdocTagsbegan withif d.single { continue }, skipping single-line docblocks entirely. php-cs-fixer'sNoSuperfluousPhpdocTagsFixerhas no such skip - it processes every docblock. So a single-line/** @inheritDoc */was kept (and expanded byPhpdocLineSpan) instead of being stripped. The ECS chain isPhpdocLineSpanFixer(single -> multi) ->NoSuperfluousPhpdocTagsFixer(strip superfluous/inheritDoc) ->NoEmptyPhpdocFixer(remove now-empty block); blink kept the same priorities (6/5/3).The fix
Remove the single-line skip so single-line docblocks are processed too.
Blast radius
This touches every single-line docblock, not just inheritDoc (
/** @var … */,/** @param … */,/** @return … */). Validated: full blink suite + go vet + golangci-lint green; 18 varied rector-src files 0-diff; mautic parity unchanged at 3; laravel 120 -> 86 with zero regressions. The strict 1705-file rectorblink-parityCI gate is the final arbiter for a change this broad.Shipped standalone (ahead of the rest of the laravel campaign) so the full gate validates it in isolation. Unit tests cover single-line
@inheritDocremoval and single-line superfluous@paramremoval.