@@ -3,7 +3,6 @@ package com.github.xepozz.php_opcodes_language.language.psi.impl
33import com.github.xepozz.php_opcodes_language.language.psi.PHPOpBlockName
44import com.github.xepozz.php_opcodes_language.language.psi.PHPOpParameter
55import com.github.xepozz.php_opcodes_language.language.psi.PHPOpTypes
6- import com.intellij.lang.tree.util.children
76
87class 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