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:
parent
98d8f5d7b2
commit
d6f8a658bf
@ -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;
|
||||||
|
@ -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,
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user