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