protected boolean applyRulesetFromComposer()

in src/com/jetbrains/php/tools/quality/psalm/PsalmComposerConfig.java [43:55]


  protected boolean applyRulesetFromComposer(@NotNull Project project, PsalmConfiguration configuration) {
    final String configPath = ComposerDataService.getInstance(project).getConfigPath();
    final VirtualFile config = LocalFileSystem.getInstance().refreshAndFindFileByPath(configPath);
    if (config == null) return false;

    final String ruleset = getRuleset(config);
    if (ruleset == null) return false;
    final VirtualFile customRulesetFile = detectCustomRulesetFile(config.getParent(), ruleset);
    if (customRulesetFile != null) {
      return modifyRulesetPsalmInspectionSetting(project, tool -> applyRuleset(project, customRulesetFile.getPath()));
    }
    return false;
  }