Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix $this/self docblock compare removed on on-final class, as it can refer to child this type #1246

Merged
merged 2 commits into from
Nov 15, 2021

Conversation

TomasVotruba
Copy link
Member

@TomasVotruba TomasVotruba commented Nov 15, 2021

No description provided.

@TomasVotruba TomasVotruba changed the title tv union self this skip Fix this/self compare removed on on-final class Nov 15, 2021
@TomasVotruba TomasVotruba changed the title Fix this/self compare removed on on-final class Fix $this/self docblock compare removed on on-final class, as it can refer to child this type Nov 15, 2021
@TomasVotruba TomasVotruba merged commit a2c2979 into main Nov 15, 2021
@TomasVotruba TomasVotruba deleted the tv-union-self-this-skip branch November 15, 2021 15:32
simPod added a commit to simPod/rector-src that referenced this pull request Jan 13, 2022
simPod added a commit to simPod/rector-src that referenced this pull request Jan 14, 2022
simPod added a commit to simPod/rector-src that referenced this pull request Jan 16, 2022
simPod added a commit to simPod/rector-src that referenced this pull request Jan 17, 2022
samsonasik pushed a commit that referenced this pull request Jan 17, 2022
…it can refer to child this type (#1246) (#1669)

* Revert Fix $this/self docblock compare removed on on-final class, as it can refer to child this type (#1246)

This reverts commit a2c2979

* Fix handling of $this return type in UnionTypes rule

`$this` refers to the exact object identity, not just the same type. Therefore, its valid and should not be removed
@see https://wiki.php.net/rfc/this_return_type for more context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant