Skip to content

ForbidVariableTypeOverwritingRule: fix false positive with fluent $this returns#348

Open
janedbal wants to merge 1 commit intomasterfrom
fix/forbid-variable-type-overwriting-false-positive
Open

ForbidVariableTypeOverwritingRule: fix false positive with fluent $this returns#348
janedbal wants to merge 1 commit intomasterfrom
fix/forbid-variable-type-overwriting-false-positive

Conversation

@janedbal
Copy link
Member

Closes #347

…is returns (#347)

Use accepts() instead of isSuperTypeOf() for type comparison, which handles
StaticType/ThisType compatibility better for fluent interfaces returning $this.
@janedbal janedbal force-pushed the fix/forbid-variable-type-overwriting-false-positive branch from c4b5195 to 8f44ce2 Compare February 18, 2026 14:43
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.

ForbidVariableTypeOverwritingRule error reported when overwriting with same type

1 participant

Comments