Skip to content

narrow variable type based on parameter type after method call #12438

@staabm

Description

@staabm

Feature request

I think we should be able to narrow a type of a argument to a CallLike based on the parameter type of the called function/method (only in case of strict_types=1 - because violating the type will throw a TypeError)

https://phpstan.org/r/b98931e9-2336-46f6-97f4-85a75bfb0882

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

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions