Skip to content

[TypeDeclaration] Allow interface return change to exact return on private method on NarrowObjectReturnTypeRector#7701

Closed
samsonasik wants to merge 2 commits intomainfrom
allow-priv
Closed

[TypeDeclaration] Allow interface return change to exact return on private method on NarrowObjectReturnTypeRector#7701
samsonasik wants to merge 2 commits intomainfrom
allow-priv

Conversation

@samsonasik
Copy link
Member

Ref #7700 (review)

private method is not part of contract, and usualyl not mockable or to be mockable by test, so changing interface return type on private method should be allowed.

@samsonasik
Copy link
Member Author

@TomasVotruba ready 👍

@TomasVotruba
Copy link
Member

As stated in my PR, this rule handles only classes. Nothing else. Keep it simple :)

@samsonasik samsonasik deleted the allow-priv branch December 2, 2025 11:30
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