Don't recheck condition
parent
4b573acde1
commit
4486ea0997
|
@ -269,7 +269,8 @@ class CompletionProvider
|
||||||
$prefixWithNamespace = $namespacePrefix . "\\" . $prefix;
|
$prefixWithNamespace = $namespacePrefix . "\\" . $prefix;
|
||||||
$fqnMatchesPrefixWithNamespace = substr($fqn, 0, strlen($prefixWithNamespace)) === $prefixWithNamespace;
|
$fqnMatchesPrefixWithNamespace = substr($fqn, 0, strlen($prefixWithNamespace)) === $prefixWithNamespace;
|
||||||
$isFullyQualifiedAndPrefixMatches = !$isNotFullyQualified && ($fqnStartsWithPrefix || $fqnMatchesPrefixWithNamespace);
|
$isFullyQualifiedAndPrefixMatches = !$isNotFullyQualified && ($fqnStartsWithPrefix || $fqnMatchesPrefixWithNamespace);
|
||||||
if (!$isFullyQualifiedAndPrefixMatches && !$isAliased && !array_search($fqn, array_values($namespaceImportTable))) {
|
if (!$isFullyQualifiedAndPrefixMatches && !$isAliased) {
|
||||||
|
if (!array_search($fqn, array_values($namespaceImportTable))) {
|
||||||
if (empty($prefix)) {
|
if (empty($prefix)) {
|
||||||
$fqn = '\\' . $fqn;
|
$fqn = '\\' . $fqn;
|
||||||
} elseif ($fqnMatchesPrefixWithNamespace) {
|
} elseif ($fqnMatchesPrefixWithNamespace) {
|
||||||
|
@ -277,9 +278,10 @@ class CompletionProvider
|
||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} elseif (!$isFullyQualifiedAndPrefixMatches && !$isAliased) {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} elseif ($fqnStartsWithPrefix && $class instanceof Node\QualifiedName && $class->isFullyQualifiedName()) {
|
} elseif ($fqnStartsWithPrefix && $class instanceof Node\QualifiedName && $class->isFullyQualifiedName()) {
|
||||||
$fqn = '\\' . $fqn;
|
$fqn = '\\' . $fqn;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue