private static boolean returnsBoolean(PsiStatement statement, boolean expectedValue) {
    return ControlFlowUtils.stripBraces(statement) instanceof PsiReturnStatement returnStatement &&
           returnStatement.getReturnValue() instanceof PsiLiteralExpression literal &&
           literal.getValue() instanceof Boolean value &&
           value.equals(expectedValue);
  }
private static boolean returnsBoolean(PsiStatement statement, boolean expectedValue)