Skip to content

Add RemoveDeadVarThisFixer#23

Merged
TomasVotruba merged 1 commit into
mainfrom
tv-var-doc
Jun 13, 2026
Merged

Add RemoveDeadVarThisFixer#23
TomasVotruba merged 1 commit into
mainfrom
tv-var-doc

Conversation

@TomasVotruba

@TomasVotruba TomasVotruba commented Jun 13, 2026

Copy link
Copy Markdown
Member

Adds RemoveDeadVarThisFixer — removes inline @var doc blocks that type $this. The type of $this is already known from the surrounding class, so the comment is dead.

-/** @var SomeType $this */
 $this->run();

Multi-line works too:

-/**
- * @var SomeType $this
- */
 $this->run();

A @var line documenting any other variable is left untouched.

Registered in DocblockLevel under the inline @var rules (2nd, right after DoubleAsteriskInlineVarFixer).

@TomasVotruba TomasVotruba merged commit 5ae3d21 into main Jun 13, 2026
7 checks passed
@TomasVotruba TomasVotruba deleted the tv-var-doc branch June 13, 2026 19:33
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