Skip to content

Property assign error is reported on wrong line #14150

@mvorisek

Description

@mvorisek

Bug report

phpstan/phpstan-src#4967 fix is working for method call param checks, but for any other rules it is unfixed

The fix should probably be extracted to some utility method, maybe even like RuleErrorBuilder::lineFromFuncCallName(), and used everywhere.

Code snippet that reproduces the problem

https://phpstan.org/r/f47c2967-c481-416b-8735-35a340713e29

Expected output

errors reported at the last/chained line

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions