Index types used in arrays

master
Hugo Thunnissen 1 month ago
parent b6eadfb799
commit 130e2c06c5

@ -537,7 +537,7 @@ Returns a list of type name strings."
(nconc used-types-rear
(phpinspect--find-used-types-in-tokens (cdr (phpinspect-function-block token))))
used-types-rear (last used-types-rear)))
((or (phpinspect-list-p token) (phpinspect-block-p token))
((or (phpinspect-list-p token) (phpinspect-block-p token) (phpinspect-array-p token))
(setq used-types-rear
(nconc used-types-rear (phpinspect--find-used-types-in-tokens (cdr token)))
used-types-rear (last used-types-rear))))

@ -98,6 +98,7 @@ if ((new Monkey())->tree() === true) {
}
return StaticThing::create(new ThingFactory())->makeThing((((new Potato())->antiPotato(new OtherThing(function (InnerFunctionParam $param) {
if ($param instanceof InstanceOffed) {
$bing = [ 'bong' => [ 'nested' => NestedArray::call(), ], ];
// nothing
}
})))));
@ -109,7 +110,7 @@ if ($param instanceof InstanceOffed) {
(copy-sequence
'("Cheese" "Bacon" "Ham" "Bagel" "Monkey" "ExtendedThing"
"StaticThing" "Thing" "ThingFactory" "Potato" "OtherThing"
"InnerFunctionParam" "PropertyType" "InstanceOffed"))
"InnerFunctionParam" "PropertyType" "InstanceOffed" "NestedArray"))
#'string<))
(sort used-types (lambda (s1 s2) (string< (phpinspect-name-string s1) (phpinspect-name-string s2))))))))

Loading…
Cancel
Save