in src/main/kotlin/com/pestphp/pest/features/customExpectations/symbols/PestCustomExpectationReferenceProvider.kt [23:40]
override fun getReferences(
element: PsiExternalReferenceHost,
hints: PsiSymbolReferenceHints
): Collection<PsiSymbolReference> {
if (element is MethodReferenceImpl) {
val classReference = element.classReference
val methodName = element.name
if (methodName != null && classReference != null && "extend" != methodName &&
PhpType.intersectsGlobal(element.project, PEST_EXPECTATION_TYPE, classReference.type)
) {
// workaround till `com.intellij.lang.javascript.navigation.JSGotoDeclarationHandler#getGotoDeclarationTargets` is not fixed
if (element.multiResolve(false).isEmpty()) {
return arrayListOf(PestCustomExpectationReference(element))
}
}
}
return emptyList()
}