test_class.file: sonar-php-plugin/src/test/java/org/sonar/plugins/php/PHPRulesDefinitionTest.java
test_class.identifier: PHPRulesDefinitionTest
test_case.body: @Test
    public void testActivationSonarLint() {
      SonarRuntime sonarRuntime = SonarRuntimeImpl.forSonarQube(Version.create(7, 3), SonarQubeSide.SERVER, SonarEdition.COMMUNITY);
      PHPRulesDefinition rulesDefinition = new PHPRulesDefinition(sonarRuntime);
      RulesDefinition.Context context = new RulesDefinition.Context();
      rulesDefinition.define(context);
      RulesDefinition.Repository repository = context.repository("php");
      assertThat(repository).isNotNull();
      assertThat(repository.name()).isEqualTo("SonarAnalyzer");
      assertThat(repository.language()).isEqualTo("php");
      assertThat(repository.rules()).hasSize(CheckList.getAllChecks().size());
  
      List<Rule> activated = repository.rules().stream().filter(Rule::activatedByDefault).collect(Collectors.toList());
      assertThat(activated).isNotEmpty();
      assertThat(activated.size()).isLessThan(CheckList.getAllChecks().size());
    }
test_case.class_method_signature: PHPRulesDefinitionTest.testActivationSonarLint()
test_case.full_signature: @Test public void testActivationSonarLint()
test_case.identifier: testActivationSonarLint
test_case.invocations: forSonarQube create define repository isNotNull assertThat isEqualTo assertThat name isEqualTo assertThat language hasSize assertThat rules size getAllChecks collect filter stream rules toList isNotEmpty assertThat isLessThan assertThat size size getAllChecks
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testActivationSonarLint()
focal_class.declarator: REPOSITORY_NAME = "SonarAnalyzer"
focal_class.modifier: private static final
focal_class.original_string: private static final String REPOSITORY_NAME = "SonarAnalyzer";
focal_class.type: String
focal_class.var_name: REPOSITORY_NAME
focal_class.declarator: RESOURCE_BASE_PATH = "org/sonar/l10n/php/rules/php"
focal_class.modifier: static final
focal_class.original_string: static final String RESOURCE_BASE_PATH = "org/sonar/l10n/php/rules/php";
focal_class.type: String
focal_class.var_name: RESOURCE_BASE_PATH
focal_class.declarator: sonarRuntime
focal_class.modifier: private final
focal_class.original_string: private final SonarRuntime sonarRuntime;
focal_class.type: SonarRuntime
focal_class.var_name: sonarRuntime
focal_class.file: sonar-php-plugin/src/main/java/org/sonar/plugins/php/PHPRulesDefinition.java
focal_class.identifier: PHPRulesDefinition
focal_class.interfaces: implements RulesDefinition
focal_class.class_method_signature: PHPRulesDefinition.PHPRulesDefinition(SonarRuntime sonarRuntime)
focal_class.full_signature: public  PHPRulesDefinition(SonarRuntime sonarRuntime)
focal_class.identifier: PHPRulesDefinition
focal_class.modifiers: public
focal_class.parameters: (SonarRuntime sonarRuntime)
focal_class.signature:  PHPRulesDefinition(SonarRuntime sonarRuntime)
focal_class.class_method_signature: PHPRulesDefinition.define(Context context)
focal_class.full_signature: @Override public void define(Context context)
focal_class.identifier: define
focal_class.modifiers: @Override public
focal_class.parameters: (Context context)
focal_class.return: void
focal_class.signature: void define(Context context)
focal_method.body: @Override
    public void define(Context context) {
      NewRepository repository = context.createRepository(CheckList.REPOSITORY_KEY, Php.KEY).setName(REPOSITORY_NAME);
  
      RuleMetadataLoader ruleMetadataLoader = new RuleMetadataLoader(RESOURCE_BASE_PATH, PHPProfileDefinition.SONAR_WAY_PATH, sonarRuntime);
  
      ruleMetadataLoader.addRulesByAnnotatedClass(repository, new ArrayList<>(CheckList.getAllChecks()));
  
      repository.done();
    }
focal_method.class_method_signature: PHPRulesDefinition.define(Context context)
focal_method.full_signature: @Override public void define(Context context)
focal_method.identifier: define
focal_method.invocations: setName createRepository addRulesByAnnotatedClass getAllChecks done
focal_method.modifiers: @Override public
focal_method.parameters: (Context context)
focal_method.return: void
focal_method.signature: void define(Context context)