Skip to content

Equivalent code analyzed differently #12593

@alexkart

Description

@alexkart

Bug report

It looks like both variants of the same code should be analyzed in the same way, but one is analyzed without errors and another one generates one error:

https://phpstan.org/r/910f7bc6-d785-4b14-abab-4e7a9d077865

https://phpstan.org/r/3c45d4be-9529-43fc-adcd-a8279d1fa13b

Code snippet that reproduces the problem

No response

Expected output

The same result.

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