Skip to content

Support final methods in ClassMethodReturnTypeOverrideGuard#4509

Merged
TomasVotruba merged 1 commit intorectorphp:mainfrom
staabm:no-final-protect
Jul 14, 2023
Merged

Support final methods in ClassMethodReturnTypeOverrideGuard#4509
TomasVotruba merged 1 commit intorectorphp:mainfrom
staabm:no-final-protect

Conversation

@staabm
Copy link
Copy Markdown
Contributor

@staabm staabm commented Jul 14, 2023

when methods are final we don't need to skip them when inferring types, as they cannot be overridden by a potential subclass and therefore cannot get in conflict with method declarations down the type hierarchy.

this PR effectively enables the feature for all rules which use ClassMethodReturnTypeOverrideGuard

@staabm staabm requested a review from TomasVotruba as a code owner July 14, 2023 09:15
@TomasVotruba
Copy link
Copy Markdown
Member

Looks good, thank you 👍

@TomasVotruba TomasVotruba merged commit f33da13 into rectorphp:main Jul 14, 2023
@staabm staabm deleted the no-final-protect branch July 14, 2023 13:31
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.

2 participants