1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Change name to arraylike-object

This commit is contained in:
Matt Brown 2020-10-12 12:39:48 -04:00 committed by Daniil Gentili
parent 98d8f5d7b2
commit d6f8a658bf
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 3 additions and 3 deletions

View File

@ -154,7 +154,7 @@ class TypeParser
} elseif (count($generic_params) === 1
&& in_array(
$generic_type_value,
['iterable', 'Traversable', 'Iterator', 'IteratorAggregate', 'array-like-object'],
['iterable', 'Traversable', 'Iterator', 'IteratorAggregate', 'arraylike-object'],
true
)
) {
@ -181,7 +181,7 @@ class TypeParser
return new TArray($generic_params);
}
if ($generic_type_value === 'array-like-object') {
if ($generic_type_value === 'arraylike-object') {
$traversable = new TGenericObject('Traversable', $generic_params);
$array_acccess = new TGenericObject('ArrayAccess', $generic_params);
$traversable->extra_types[$array_acccess->getKey()] = $array_acccess;

View File

@ -72,7 +72,7 @@ class TypeTokenizer
'open-resource' => true,
'closed-resource' => true,
'associative-array' => true,
'array-like-object' => true,
'arraylike-object' => true,
];
/**