mirror of
https://github.com/danog/PHP-Parser.git
synced 2024-11-30 04:19:30 +01:00
Remove redundant check in NameResolver
This commit is contained in:
parent
53d33345e1
commit
b7a034cd9f
@ -55,7 +55,7 @@ interface (and extend `PHPParser_NodeAbstract`). Furthermore nodes are divided i
|
||||
`PHPParser_Node_Scalar` inherits from `PHPParser_Node_Expr`.
|
||||
|
||||
Each node may have subnodes. For example `PHPParser_Node_Expr_Plus` has two subnodes, namely `left`
|
||||
and `right`, which represend the left hand side and right hand side expressions of the plus operation.
|
||||
and `right`, which represent the left hand side and right hand side expressions of the plus operation.
|
||||
Subnodes are accessed as normal properties:
|
||||
|
||||
$node->left
|
||||
|
@ -52,13 +52,11 @@ class PHPParser_NodeVisitor_NameResolver extends PHPParser_NodeVisitorAbstract
|
||||
|| $node instanceof PHPParser_Node_Expr_Instanceof
|
||||
) {
|
||||
$node->class = $this->resolveClassName($node->class);
|
||||
} elseif ($node instanceof PHPParser_Node_Expr_FuncCall) {
|
||||
$node->name = $this->resolveOtherName($node->name);
|
||||
} elseif ($node instanceof PHPParser_Node_Expr_ConstFetch) {
|
||||
$node->name = $this->resolveOtherName($node->name);
|
||||
} elseif ($node instanceof PHPParser_Node_Param
|
||||
&& $node->type instanceof PHPParser_Node_Name
|
||||
} elseif ($node instanceof PHPParser_Node_Expr_FuncCall
|
||||
|| $node instanceof PHPParser_Node_Expr_ConstFetch
|
||||
) {
|
||||
$node->name = $this->resolveOtherName($node->name);
|
||||
} elseif ($node instanceof PHPParser_Node_Param) {
|
||||
$node->type = $this->resolveClassName($node->type);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user