Skip to content

function.alreadyNarrowedType wrongly reported #13291

@Harfusha

Description

@Harfusha

Bug report

After update to phpstan 2.1.19 error Call to method {METHOD} with true will always evaluate to true. started to show up.

It happens when function always return true and named parameter is used in the function call.

Code snippet that reproduces the problem

https://phpstan.org/r/6b235a30-9558-49fd-88be-554e90005457

Expected output

No error

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

No response

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