Skip to content

Array key always exists false positive with composite keys #143

@InvisibleSmiley

Description

@InvisibleSmiley

https://phpstan.org/r/50a1171b-7243-4e7d-a9d4-9d0b21cc1d02

"Call to function array_key_exists() with non-empty-string and array will always evaluate to true."

I disabled the following error message using checkMissingIterableValueType: false:
"Function foo() has parameter $arr with no value type specified in iterable type array."
Adding a typehint for for the array makes the other error go away, but that's not the point here.

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