Skip to content

Dynamic function call produces arguments.count error #13054

Description

@JulienChavee

Bug report

We have phpstan reporting false positive errors for dynamically function calls, when calls are conditioned with some checks before the call, based on the a variable that is used to know which function will be called.

To avoid the error, I changed the "if" condition to match the complete function name that is called

Code snippet that reproduces the problem

https://phpstan.org/r/8d1e0f7e-2776-4e9d-ab9e-d393ce6b8dab

Expected output

It should not report error there

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

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions