Optimized if
parent
2357bf7929
commit
cd57312e6a
|
@ -45,11 +45,9 @@ function getReferencedFqn(Node $node)
|
|||
$grandParent = $parent->getAttribute('parentNode');
|
||||
if ($grandParent instanceof Node\Stmt\GroupUse) {
|
||||
$name = $grandParent->prefix . '\\' . $name;
|
||||
} else if ($grandParent instanceof Node\Stmt\Use_) {
|
||||
if ($grandParent->type === Node\Stmt\Use_::TYPE_FUNCTION) {
|
||||
} else if ($grandParent instanceof Node\Stmt\Use_ && $grandParent->type === Node\Stmt\Use_::TYPE_FUNCTION) {
|
||||
$name .= '()';
|
||||
}
|
||||
}
|
||||
// Only the name node should be considered a reference, not the New_ node itself
|
||||
} else if ($parent instanceof Node\Expr\New_) {
|
||||
if (!($parent->class instanceof Node\Name)) {
|
||||
|
|
Loading…
Reference in New Issue