PsiVariable (PsiStatement statement) { if (!(statement instanceof PsiExpressionStatement expressionStatement)) { return null; } final PsiExpression expression = expressionStatement.getExpression(); if (!(expression instanceof PsiMethodCallExpression methodCallExpression)) { return null; } return getVariable(methodCallExpression); }