Psalm: array_key_exists to also accept `ArrayObject`

Created on 26 Aug 2019  路  2Comments  路  Source: vimeo/psalm

I think the stub should be like

/**
 * @psalm-template TKey as array-key
 *
 * @param TKey $key
 * @param array<TKey, mixed>|\ArrayObject<TKey, mixed> $search
 *
 * @return bool
 */
function array_key_exists($key, array $search) : bool
{
}
bug

All 2 comments

Thanks - would you mind PRing?

Yep, I'll have a quick look whether any other similar functions require it as well first.

Was this page helpful?
0 / 5 - 0 ratings