1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00

arraylike-object should include countable

Fixes #4398
This commit is contained in:
Matthew Brown 2020-10-22 11:48:24 -04:00 committed by GitHub
parent ad5a8c247b
commit 0f9b4003f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -185,7 +185,10 @@ class TypeParser
if ($generic_type_value === 'arraylike-object') {
$traversable = new TGenericObject('Traversable', $generic_params);
$array_acccess = new TGenericObject('ArrayAccess', $generic_params);
$countable = new TNamedObject('Countable');
$traversable->extra_types[$array_acccess->getKey()] = $array_acccess;
$traversable->extra_types[$countable->getKey()] = $countable;
return $traversable;
}