Skip to content

Commit 39ab488

Browse files
committed
fix: 2023 ide compatibility
1 parent dd99e30 commit 39ab488

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package com.github.xepozz.php_opcodes_language.language.psi.impl
33
import com.github.xepozz.php_opcodes_language.language.psi.PHPOpBlockName
44
import com.github.xepozz.php_opcodes_language.language.psi.PHPOpParameter
55
import com.github.xepozz.php_opcodes_language.language.psi.PHPOpTypes
6-
import com.intellij.lang.tree.util.children
76

87
class PHPOpPsiImplUtil {
98
companion object {
@@ -12,7 +11,7 @@ class PHPOpPsiImplUtil {
1211

1312
@JvmStatic
1413
fun isFunction(element: PHPOpBlockName): Boolean = element.node.let {
15-
val children = it.children().toList()
14+
val children = it.getChildren(null)
1615
children.size == 1
1716
&& children[0].elementType == PHPOpTypes.IDENTIFIER
1817
&& !children[0].text.contains("\\")
@@ -21,15 +20,15 @@ class PHPOpPsiImplUtil {
2120
// todo: check for class in a different way
2221
@JvmStatic
2322
fun isClass(element: PHPOpBlockName): Boolean = element.node.let {
24-
val children = it.children().toList()
23+
val children = it.getChildren(null)
2524
children.size == 1
2625
&& children[0].elementType == PHPOpTypes.IDENTIFIER
2726
&& children[0].text.contains("\\")
2827
}
2928

3029
@JvmStatic
3130
fun isClassMethod(element: PHPOpBlockName): Boolean = element.node.let {
32-
val children = it.children().toList()
31+
val children = it.getChildren(null)
3332
children.size == 4
3433
&& children[0].elementType == PHPOpTypes.IDENTIFIER
3534
&& children[1].elementType == PHPOpTypes.COLON

0 commit comments

Comments
 (0)