if (!Symfony2ProjectComponent.isEnabled(psiElement)) {
return null;
}
MethodReferenceBag bag = PhpElementsUtil.getMethodParameterReferenceBag(psiElement);
if(bag == null) {
return null;
}
// try on current method
MethodMatcher.MethodMatchParameter methodMatchParameter = new StringParameterMatcher(psiElement, parameterIndex)
.withSignature(this.signatures)
.match();
if(methodMatchParameter != null) {
return methodMatchParameter;
}
// walk down next method
MethodReference methodReference = bag.getMethodReference();
PsiElement method = methodReference.resolve();
if(!(method instanceof Method)) {
return null;
}
PsiElement[] parameterReferences = PhpElementsUtil.getMethodParameterReferences((Method) method, bag.getParameterBag().getIndex());
if(parameterReferences == null || parameterReferences.length == 0) {
return null;
}
for(PsiElement var: parameterReferences) {