Skip to content

Commit cde7ed9

Browse files
committed
fix: remove incorrect refs
1 parent 88b8939 commit cde7ed9

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/main/kotlin/com/github/xepozz/php_opcodes_language/language/psi/impl/PHPOpParameterBaseImpl.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,10 @@ abstract class PHPOpParameterBaseImpl : PHPOpParameter, PHPOpElementImpl {
5151
override fun isReferenceTo(psiElement: PsiElement) = when (psiElement) {
5252
!is PHPOpParameter -> false
5353
else -> when {
54-
isSelfReferencable(this) && isSelfReferencable(psiElement) -> true
55-
// isThisVariable(this) && isThisVariable(psiElement) -> false
5654
isPrimitive(this) || isPrimitive(psiElement) -> false
57-
!this.isVariable || !psiElement.isVariable -> false
58-
else -> this.text == psiElement.text
55+
isSelfReferencable(this) && isSelfReferencable(psiElement) -> true
56+
this.isVariable && psiElement.isVariable -> true
57+
else -> false
5958
}
6059
}
6160

src/main/kotlin/com/github/xepozz/php_opcodes_language/language/psi/impl/PHPOpParenParameterBaseImpl.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ abstract class PHPOpParenParameterBaseImpl : PHPOpParenParameter, PHPOpElementIm
5252
override fun isReferenceTo(psiElement: PsiElement) = when (psiElement) {
5353
!is PHPOpParenParameter -> false
5454
else -> when {
55-
!this.parameter.isVariable || !psiElement.parameter.isVariable -> false
56-
else -> this.text == psiElement.text
55+
this.parameter.isVariable && psiElement.parameter.isVariable -> true
56+
else -> false
5757
}
5858
}
5959

0 commit comments

Comments
 (0)