rector-src icon indicating copy to clipboard operation
rector-src copied to clipboard

feature: remove @return void from magic methods

Open parijke opened this issue 2 months ago • 5 comments

This PR removed the dead code from magic methods.

parijke avatar Nov 28 '25 07:11 parijke

The rule purpose is only remove @return tag when there is native return type.

For removing @return tag when there is no native type, that should be in separate rule so the functionality is isolated, and easy to exclude/skip when needed.

samsonasik avatar Nov 28 '25 08:11 samsonasik

Add another rule under rules/DeadCode/Rector/ClasaMethod, add test under rules-tests/DeadCode/Rector/ClassMethod as well

samsonasik avatar Nov 29 '25 11:11 samsonasik

@parijke Any update on this? I'd like to merge and ship it

TomasVotruba avatar Dec 19 '25 21:12 TomasVotruba

No need, just new rule under DeadCode\Recror\ClassMethod is fine imo :)

samsonasik avatar Dec 26 '25 08:12 samsonasik