phpstan-strict-rules icon indicating copy to clipboard operation
phpstan-strict-rules copied to clipboard

Array key always exists false positive with composite keys

Open InvisibleSmiley opened this issue 4 years ago • 0 comments

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.

InvisibleSmiley avatar Nov 23 '21 13:11 InvisibleSmiley