Merge pull request #112 from tylerchr/nsr-typed-properties

#111 NamespaceResolver: Resolve PHP 7.4 class property types
This commit is contained in:
Vadym Slizov 2020-07-26 14:39:12 +02:00 committed by GitHub
commit 70e5fa4db5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,6 +111,11 @@ func (nsr *NamespaceResolver) EnterNode(w walker.Walkable) bool {
nsr.ResolveType(n.ReturnType)
}
case *stmt.PropertyList:
if n.Type != nil {
nsr.ResolveType(n.Type)
}
case *expr.Closure:
for _, parameter := range n.Params {
nsr.ResolveType(parameter.(*node.Parameter).VariableType)