PsiReference psiReference = methodRef.getReference();
if (null == psiReference) {
return false;
}
Method method = getMultiResolvedMethod(psiReference);
if (method == null) {
return false;
}
PhpClass methodClass = method.getContainingClass();
if(methodClass == null) {
return false;
}
for (Method expectedMethod : expectedMethods) {
// @TODO: its stuff from beginning times :)
if(expectedMethod == null) {
continue;
}
PhpClass containingClass = expectedMethod.getContainingClass();
if (null != containingClass && expectedMethod.getName().equals(method.getName()) && isInstanceOf(methodClass, containingClass)) {
return true;
}
}
return false;