branch: externals/phpinspect
commit 130e2c06c59f1fe31b3ed3ab90ea61e3d27814f1
Author: Hugo Thunnissen <[email protected]>
Commit: Hugo Thunnissen <[email protected]>
Index types used in arrays
---
phpinspect-index.el | 2 +-
test/test-index.el | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/phpinspect-index.el b/phpinspect-index.el
index 861e355716..502b786861 100644
--- a/phpinspect-index.el
+++ b/phpinspect-index.el
@@ -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))))
diff --git a/test/test-index.el b/test/test-index.el
index faf243eab2..81abf763b6 100644
--- a/test/test-index.el
+++ b/test/test-index.el
@@ -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))))))))