Skip to content

No inference for variables declared inside chained calls #12663

@vudaltsov

Description

@vudaltsov

Bug report

PHPStan considers variables, declared throughout an expression as mixed.

Code snippet that reproduces the problem

https://phpstan.org/r/3f3529bd-01bd-4d4c-85e6-7a033cf140fa

Expected output

No errors, the code is correct, see https://psalm.dev/r/8d88621b03 and https://3v4l.org/qt36V.

Did PHPStan help you today? Did it make you happy in any way?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions