test_class.file: sonar-php-plugin/src/test/java/org/sonar/plugins/php/PhpExclusionsFileFilterTest.java
test_class.identifier: PhpExclusionsFileFilterTest
test_case.body: @Test
    public void should_include_vendor_when_property_is_empty() {
      MapSettings settings = new MapSettings();
      settings.setProperty(PhpPlugin.PHP_EXCLUSIONS_KEY, "");
  
      PhpExclusionsFileFilter filter = new PhpExclusionsFileFilter(settings.asConfig());
  
      assertThat(filter.accept(inputFile("some_app.php"))).isTrue();
      assertThat(filter.accept(inputFile("vendor/some_lib.php"))).isTrue();
    }
test_case.class_method_signature: PhpExclusionsFileFilterTest.should_include_vendor_when_property_is_empty()
test_case.full_signature: @Test public void should_include_vendor_when_property_is_empty()
test_case.identifier: should_include_vendor_when_property_is_empty
test_case.invocations: setProperty asConfig isTrue assertThat accept inputFile isTrue assertThat accept inputFile
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void should_include_vendor_when_property_is_empty()
focal_class.declarator: excludedPatterns
focal_class.modifier: private final
focal_class.original_string: private final String[] excludedPatterns;
focal_class.type: String[]
focal_class.var_name: excludedPatterns
focal_class.declarator: LOG = Loggers.get(PhpExclusionsFileFilter.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = Loggers.get(PhpExclusionsFileFilter.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: DEFAULT_AVERAGE_LINE_LENGTH_THRESHOLD = 220
focal_class.modifier: private static final
focal_class.original_string: private static final int DEFAULT_AVERAGE_LINE_LENGTH_THRESHOLD = 220;
focal_class.type: int
focal_class.var_name: DEFAULT_AVERAGE_LINE_LENGTH_THRESHOLD
focal_class.file: sonar-php-plugin/src/main/java/org/sonar/plugins/php/PhpExclusionsFileFilter.java
focal_class.identifier: PhpExclusionsFileFilter
focal_class.interfaces: implements InputFileFilter
focal_class.class_method_signature: PhpExclusionsFileFilter.PhpExclusionsFileFilter(Configuration configuration)
focal_class.full_signature: public  PhpExclusionsFileFilter(Configuration configuration)
focal_class.identifier: PhpExclusionsFileFilter
focal_class.modifiers: public
focal_class.parameters: (Configuration configuration)
focal_class.signature:  PhpExclusionsFileFilter(Configuration configuration)
focal_class.class_method_signature: PhpExclusionsFileFilter.accept(InputFile inputFile)
focal_class.full_signature: @Override public boolean accept(InputFile inputFile)
focal_class.identifier: accept
focal_class.modifiers: @Override public
focal_class.parameters: (InputFile inputFile)
focal_class.return: boolean
focal_class.signature: boolean accept(InputFile inputFile)
focal_method.body: @Override
    public boolean accept(InputFile inputFile) {
      if (!Php.KEY.equals(inputFile.language())) {
        return true;
      }
  
      String relativePath = inputFile.uri().toString();
      if (WildcardPattern.match(WildcardPattern.create(excludedPatterns), relativePath)) {
        LOG.debug("File [" + inputFile.uri() + "] is excluded by '" + PhpPlugin.PHP_EXCLUSIONS_KEY + "' property and will not be analyzed");
        return false;
      }
  
      if (new AverageLineLengthCalculator(inputFile).getAverageLineLength() > DEFAULT_AVERAGE_LINE_LENGTH_THRESHOLD) {
        LOG.debug("File [" + inputFile.uri() + "] is excluded because it is considered generated (average line length is too big).");
        return false;
      }
  
      return true;
    }
focal_method.class_method_signature: PhpExclusionsFileFilter.accept(InputFile inputFile)
focal_method.full_signature: @Override public boolean accept(InputFile inputFile)
focal_method.identifier: accept
focal_method.invocations: equals language toString uri match create debug uri getAverageLineLength debug uri
focal_method.modifiers: @Override public
focal_method.parameters: (InputFile inputFile)
focal_method.return: boolean
focal_method.signature: boolean accept(InputFile inputFile)