1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +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 } elseif (count($generic_params) === 1
&& in_array( && in_array(
$generic_type_value, $generic_type_value,
['iterable', 'Traversable', 'Iterator', 'IteratorAggregate', 'array-like-object'], ['iterable', 'Traversable', 'Iterator', 'IteratorAggregate', 'arraylike-object'],
true true
) )
) { ) {
@ -181,7 +181,7 @@ class TypeParser
return new TArray($generic_params); return new TArray($generic_params);
} }
if ($generic_type_value === 'array-like-object') { if ($generic_type_value === 'arraylike-object') {
$traversable = new TGenericObject('Traversable', $generic_params); $traversable = new TGenericObject('Traversable', $generic_params);
$array_acccess = new TGenericObject('ArrayAccess', $generic_params); $array_acccess = new TGenericObject('ArrayAccess', $generic_params);
$traversable->extra_types[$array_acccess->getKey()] = $array_acccess; $traversable->extra_types[$array_acccess->getKey()] = $array_acccess;

View File

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