Skip to content

Conversation

@parijke
Copy link

@parijke parijke commented Nov 28, 2025

This PR removed the dead code from magic methods.

@parijke parijke changed the title feature: add handling for void magic methods feature: remove @return from void magic methods Nov 28, 2025
@parijke parijke changed the title feature: remove @return from void magic methods feature: remove @return void from magic methods Nov 28, 2025
@samsonasik
Copy link
Member

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
Copy link
Member

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

@TomasVotruba
Copy link
Member

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

@samsonasik
Copy link
Member

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

@parijke parijke marked this pull request as draft December 26, 2025 09:52
@parijke parijke force-pushed the feature/remove-void-from-magic-methods-as-return branch 2 times, most recently from 010b7b5 to 4b9d483 Compare December 26, 2025 09:54
@parijke parijke force-pushed the feature/remove-void-from-magic-methods-as-return branch 6 times, most recently from aee360a to 22bee06 Compare December 29, 2025 08:34
@parijke parijke force-pushed the feature/remove-void-from-magic-methods-as-return branch from 22bee06 to cfd2280 Compare December 29, 2025 08:51
@parijke parijke force-pushed the feature/remove-void-from-magic-methods-as-return branch from 603e154 to 44ffdb8 Compare December 29, 2025 09:33
@parijke parijke requested a review from samsonasik December 29, 2025 09:36
@parijke parijke marked this pull request as ready for review December 29, 2025 09:36
@parijke parijke closed this Dec 29, 2025
@parijke parijke deleted the feature/remove-void-from-magic-methods-as-return branch December 29, 2025 09:59
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.

3 participants