Skip to content

Wrong detection of type in combination with array_push #11846

@jg-development

Description

@jg-development

Bug report

I am using rector (which uses phpstan for detecting type) for code quality.
Details in this issue:
rectorphp/rector#8860

As @samsonasik claims the reason for the wrong detection is on phpstan`s side.

Code snippet that reproduces the problem

https://phpstan.org/r/73565769-6b97-48b7-8b52-e3b8883a5961

Expected output

The dumpType of phpstan should be "true"

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