Skip to content

isset and empty constructs appears as PropertyWrites in propertyUsages of ClassPropertiesNode #5337

@janedbal

Description

@janedbal

Bug report

Assuming following code, there will be two PropertyWrite elements in any custom rule hooked to ClassPropertiesNode (one for assign, one for empty). Detected by rule like this.

Code snippet that reproduces the problem

https://phpstan.org/r/f9dee572-568e-462f-a4c1-24f56594f804

Expected output

Only one property write to appear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions