in src/main/kotlin/com/pestphp/pest/features/customExpectations/symbols/PestCustomExpectationUsageSearcher.kt [47:55]
fun findReferencesToSymbol(
symbol: PestCustomExpectationSymbol,
leafOccurrence: LeafOccurrence
): Collection<PestCustomExpectationReference> {
val methodReference = PhpPsiUtil.getParentOfClass(leafOccurrence.start, MethodReference::class.java)
if (methodReference?.nameNode == null) return emptyList()
val possibleReference = PestCustomExpectationReference(methodReference)
return if (possibleReference.resolvesTo(symbol)) listOf(possibleReference) else emptyList()
}