for(ArrayHashElement arrayHashElement: arrayHashElements) {
PsiElement arrayKey = arrayHashElement.getKey();
// support string and constants
if(arrayKey instanceof StringLiteralExpression) {
events.add(new EventDispatcherSubscribedEvent(((StringLiteralExpression) arrayKey).getContents(), phpClass.getPresentableFQN()));
} else if(arrayKey instanceof PhpReference) {
String resolvedString = PhpElementsUtil.getStringValue(arrayKey);
if(resolvedString != null) {
events.add(new EventDispatcherSubscribedEvent(resolvedString, phpClass.getPresentableFQN(), ((PhpReference) arrayKey).getSignature()));
}
}
}