Skip to content

Blink parity: process single-line docblocks in NoSuperfluousPhpdocTags - #147

Merged
TomasVotruba merged 1 commit into
mainfrom
tv-blink-laravel-2
Oct 5, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
tv-blink-laravel-2

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

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 NoSuperfluousPhpdocTags began with if d.single { continue }, skipping single-line docblocks entirely. php-cs-fixer's NoSuperfluousPhpdocTagsFixer has no such skip - it processes every docblock. So a single-line /** @inheritDoc */ was kept (and expanded by PhpdocLineSpan) instead of being stripped. The ECS chain is PhpdocLineSpanFixer (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 rector blink-parity CI 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 @inheritDoc removal and single-line superfluous @param removal.

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.
@TomasVotruba
TomasVotruba merged commit 6f7431c into main Oct 5, 2026
19 checks passed
@TomasVotruba
TomasVotruba deleted the tv-blink-laravel-2 branch October 5, 2026 22:18
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