Skip to content

Commit 0a0ddeb

Browse files
committed
fix: filter defined and re-defined variables
1 parent 1cfed2e commit 0a0ddeb

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/main/kotlin/com/github/tempest/framework/php/mixin.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ import com.jetbrains.php.lang.psi.elements.Variable
77
fun PhpFile.getPhpViewVariables(): Set<Variable> {
88
return PsiTreeUtil.findChildrenOfType(this, Variable::class.java)
99
.filter { it.useScope == useScope }
10+
.filter { !it.isDeclaration }
11+
.distinctBy { it.name }
1012
.toSet()
1113
}

src/main/resources/META-INF/plugin.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<xml.tagNameProvider
1919
implementation="com.github.tempest.framework.ComponentTagNameProvider"/>
2020
<psi.referenceContributor
21+
order="first"
2122
language="HTML"
2223
implementation="com.github.tempest.framework.views.references.ComponentReferenceContributor"/>
2324
<spellchecker.bundledDictionaryProvider

0 commit comments

Comments
 (0)