test_class.declarator: logTester = new LogTester()
test_class.modifier: @org.junit.Rule
    public
test_class.original_string: @org.junit.Rule
    public LogTester logTester = new LogTester();
test_class.type: LogTester
test_class.var_name: logTester
test_class.declarator: context = SensorContextTester.create(new File("src/test/resources").getAbsoluteFile())
test_class.modifier: private final
test_class.original_string: private final SensorContextTester context = SensorContextTester.create(new File("src/test/resources").getAbsoluteFile());
test_class.type: SensorContextTester
test_class.var_name: context
test_class.declarator: checkFactory = new CheckFactory(mock(ActiveRules.class))
test_class.modifier: private
test_class.original_string: private CheckFactory checkFactory = new CheckFactory(mock(ActiveRules.class));
test_class.type: CheckFactory
test_class.var_name: checkFactory
test_class.declarator: SONARLINT_DETECTABLE_VERSION = Version.create(6, 7)
test_class.modifier: private static final
test_class.original_string: private static final Version SONARLINT_DETECTABLE_VERSION = Version.create(6, 7);
test_class.type: Version
test_class.var_name: SONARLINT_DETECTABLE_VERSION
test_class.declarator: SONARLINT_RUNTIME = SonarRuntimeImpl.forSonarLint(SONARLINT_DETECTABLE_VERSION)
test_class.modifier: private static final
test_class.original_string: private static final SonarRuntime SONARLINT_RUNTIME = SonarRuntimeImpl.forSonarLint(SONARLINT_DETECTABLE_VERSION);
test_class.type: SonarRuntime
test_class.var_name: SONARLINT_RUNTIME
test_class.declarator: NOT_SONARLINT_RUNTIME = SonarRuntimeImpl.forSonarQube(SONARLINT_DETECTABLE_VERSION, SonarQubeSide.SERVER, SonarEdition.COMMUNITY)
test_class.modifier: private static final
test_class.original_string: private static final SonarRuntime NOT_SONARLINT_RUNTIME = SonarRuntimeImpl.forSonarQube(SONARLINT_DETECTABLE_VERSION, SonarQubeSide.SERVER, SonarEdition.COMMUNITY);
test_class.type: SonarRuntime
test_class.var_name: NOT_SONARLINT_RUNTIME
test_class.declarator: SONARQUBE_6_7 = SonarRuntimeImpl.forSonarQube(Version.create(6, 7), SonarQubeSide.SCANNER, SonarEdition.COMMUNITY)
test_class.modifier: private static final
test_class.original_string: private static final SonarRuntime SONARQUBE_6_7 = SonarRuntimeImpl.forSonarQube(Version.create(6, 7), SonarQubeSide.SCANNER, SonarEdition.COMMUNITY);
test_class.type: SonarRuntime
test_class.var_name: SONARQUBE_6_7
test_class.declarator: PARSE_ERROR_FILE = "parseError.php"
test_class.modifier: private static final
test_class.original_string: private static final String PARSE_ERROR_FILE = "parseError.php";
test_class.type: String
test_class.var_name: PARSE_ERROR_FILE
test_class.declarator: ANALYZED_FILE = "PHPSquidSensor.php"
test_class.modifier: private static final
test_class.original_string: private static final String ANALYZED_FILE = "PHPSquidSensor.php";
test_class.type: String
test_class.var_name: ANALYZED_FILE
test_class.declarator: TEST_FILE = "Test.php"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_FILE = "Test.php";
test_class.type: String
test_class.var_name: TEST_FILE
test_class.declarator: tempReportFiles = new HashSet<>()
test_class.modifier: private
test_class.original_string: private Set<File> tempReportFiles = new HashSet<>();
test_class.type: Set<File>
test_class.var_name: tempReportFiles
test_class.declarator: tmpFolder = new TemporaryFolder()
test_class.modifier: @org.junit.Rule
    public
test_class.original_string: @org.junit.Rule
    public TemporaryFolder tmpFolder = new TemporaryFolder();
test_class.type: TemporaryFolder
test_class.var_name: tmpFolder
test_class.declarator: CUSTOM_RULES = {new PHPCustomRuleRepository() {
      @Override
      public String repositoryKey() {
        return "customKey";
      }
  
      @Override
      public ImmutableList<Class> checkClasses() {
        return ImmutableList.of(MyCustomRule.class);
      }
    }}
test_class.modifier: private static final
test_class.original_string: private static final PHPCustomRuleRepository[] CUSTOM_RULES = {new PHPCustomRuleRepository() {
      @Override
      public String repositoryKey() {
        return "customKey";
      }
  
      @Override
      public ImmutableList<Class> checkClasses() {
        return ImmutableList.of(MyCustomRule.class);
      }
    }};
test_class.type: PHPCustomRuleRepository[]
test_class.var_name: CUSTOM_RULES
test_class.file: sonar-php-plugin/src/test/java/org/sonar/plugins/php/PHPSensorTest.java
test_class.identifier: PHPSensorTest
test_case.body: @Test
    public void should_disable_unnecessary_features_for_sonarlint() throws Exception {
      context.settings().setProperty(PhpPlugin.PHPUNIT_TESTS_REPORT_PATH_KEY, PhpTestUtils.PHPUNIT_REPORT_NAME);
      context.settings().setProperty(PhpPlugin.PHPUNIT_COVERAGE_REPORT_PATHS_KEY, PhpTestUtils.PHPUNIT_COVERAGE_REPORT);
      DefaultInputFile inputFile = inputFile(ANALYZED_FILE);
  
      DefaultInputFile testFile = TestInputFileBuilder.create("moduleKey", "src/AppTest.php")
        .setModuleBaseDir(context.fileSystem().baseDirPath())
        .setType(InputFile.Type.TEST)
        .setLanguage(Php.KEY).build();
  
      String testFileKey = testFile.key();
      String mainFileKey = inputFile.key();
  
      context.fileSystem().add(inputFile);
      context.fileSystem().add(testFile);
  
      context.setRuntime(SONARLINT_RUNTIME);
      createSensor().execute(context);
  
      // no cpd tokens
      assertThat(context.cpdTokens(mainFileKey)).isNull();
  
      // no highlighting
      assertThat(context.highlightingTypeAt(mainFileKey, 1, 0)).isEmpty();
  
      // no tests
      assertThat(context.measure(testFileKey, CoreMetrics.TESTS)).isNull();
  
      // no coverage
      assertThat(context.measure(testFileKey, CoreMetrics.LINES_TO_COVER)).isNull();
  
      // metrics are not saved
      assertThat(context.measure(mainFileKey, CoreMetrics.NCLOC)).isNull();
  
      // no symbol highlighting
      assertThat(context.referencesForSymbolAt(mainFileKey, 6, 7)).isNull();
  
      context.setRuntime(NOT_SONARLINT_RUNTIME);
      createSensor().execute(context);
  
      // cpd tokens exist
      assertThat(context.cpdTokens(mainFileKey)).isNotEmpty();
  
      // highlighting exists
      assertThat(context.highlightingTypeAt(mainFileKey, 2, 0)).isNotEmpty();
  
      // tests exist
      assertThat(context.measure(testFileKey, CoreMetrics.TESTS)).isNotNull();
  
      // metrics are saved
      assertThat(context.measure(mainFileKey, CoreMetrics.NCLOC)).isNotNull();
  
      // symbol highlighting is there
      assertThat(context.referencesForSymbolAt(mainFileKey, 6, 7)).isNotNull();
    }
test_case.class_method_signature: PHPSensorTest.should_disable_unnecessary_features_for_sonarlint()
test_case.full_signature: @Test public void should_disable_unnecessary_features_for_sonarlint()
test_case.identifier: should_disable_unnecessary_features_for_sonarlint
test_case.invocations: setProperty settings setProperty settings inputFile build setLanguage setType setModuleBaseDir create baseDirPath fileSystem key key add fileSystem add fileSystem setRuntime execute createSensor isNull assertThat cpdTokens isEmpty assertThat highlightingTypeAt isNull assertThat measure isNull assertThat measure isNull assertThat measure isNull assertThat referencesForSymbolAt setRuntime execute createSensor isNotEmpty assertThat cpdTokens isNotEmpty assertThat highlightingTypeAt isNotNull assertThat measure isNotNull assertThat measure isNotNull assertThat referencesForSymbolAt
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void should_disable_unnecessary_features_for_sonarlint()
focal_class.declarator: LOG = Loggers.get(PHPSensor.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = Loggers.get(PHPSensor.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: fileLinesContextFactory
focal_class.modifier: private final
focal_class.original_string: private final FileLinesContextFactory fileLinesContextFactory;
focal_class.type: FileLinesContextFactory
focal_class.var_name: fileLinesContextFactory
focal_class.declarator: checks
focal_class.modifier: private final
focal_class.original_string: private final PHPChecks checks;
focal_class.type: PHPChecks
focal_class.var_name: checks
focal_class.declarator: noSonarFilter
focal_class.modifier: private final
focal_class.original_string: private final NoSonarFilter noSonarFilter;
focal_class.type: NoSonarFilter
focal_class.var_name: noSonarFilter
focal_class.declarator: parsingErrorRuleKey
focal_class.modifier: private
focal_class.original_string: private RuleKey parsingErrorRuleKey;
focal_class.type: RuleKey
focal_class.var_name: parsingErrorRuleKey
focal_class.file: sonar-php-plugin/src/main/java/org/sonar/plugins/php/PHPSensor.java
focal_class.identifier: PHPSensor
focal_class.interfaces: implements Sensor
focal_class.class_method_signature: PHPSensor.PHPSensor(FileLinesContextFactory fileLinesContextFactory,
      CheckFactory checkFactory, NoSonarFilter noSonarFilter)
focal_class.full_signature: public  PHPSensor(FileLinesContextFactory fileLinesContextFactory,
      CheckFactory checkFactory, NoSonarFilter noSonarFilter)
focal_class.identifier: PHPSensor
focal_class.modifiers: public
focal_class.parameters: (FileLinesContextFactory fileLinesContextFactory,
      CheckFactory checkFactory, NoSonarFilter noSonarFilter)
focal_class.signature:  PHPSensor(FileLinesContextFactory fileLinesContextFactory,
      CheckFactory checkFactory, NoSonarFilter noSonarFilter)
focal_class.class_method_signature: PHPSensor.PHPSensor(FileLinesContextFactory fileLinesContextFactory,
      CheckFactory checkFactory, NoSonarFilter noSonarFilter, @Nullable PHPCustomRuleRepository[] customRuleRepositories)
focal_class.full_signature: public  PHPSensor(FileLinesContextFactory fileLinesContextFactory,
      CheckFactory checkFactory, NoSonarFilter noSonarFilter, @Nullable PHPCustomRuleRepository[] customRuleRepositories)
focal_class.identifier: PHPSensor
focal_class.modifiers: public
focal_class.parameters: (FileLinesContextFactory fileLinesContextFactory,
      CheckFactory checkFactory, NoSonarFilter noSonarFilter, @Nullable PHPCustomRuleRepository[] customRuleRepositories)
focal_class.signature:  PHPSensor(FileLinesContextFactory fileLinesContextFactory,
      CheckFactory checkFactory, NoSonarFilter noSonarFilter, @Nullable PHPCustomRuleRepository[] customRuleRepositories)
focal_class.class_method_signature: PHPSensor.PHPSensor(FileLinesContextFactory fileLinesContextFactory, PHPChecks checks, NoSonarFilter noSonarFilter)
focal_class.full_signature:   PHPSensor(FileLinesContextFactory fileLinesContextFactory, PHPChecks checks, NoSonarFilter noSonarFilter)
focal_class.identifier: PHPSensor
focal_class.parameters: (FileLinesContextFactory fileLinesContextFactory, PHPChecks checks, NoSonarFilter noSonarFilter)
focal_class.signature:  PHPSensor(FileLinesContextFactory fileLinesContextFactory, PHPChecks checks, NoSonarFilter noSonarFilter)
focal_class.class_method_signature: PHPSensor.describe(SensorDescriptor descriptor)
focal_class.full_signature: @Override public void describe(SensorDescriptor descriptor)
focal_class.identifier: describe
focal_class.modifiers: @Override public
focal_class.parameters: (SensorDescriptor descriptor)
focal_class.return: void
focal_class.signature: void describe(SensorDescriptor descriptor)
focal_class.class_method_signature: PHPSensor.execute(SensorContext context)
focal_class.full_signature: @Override public void execute(SensorContext context)
focal_class.identifier: execute
focal_class.modifiers: @Override public
focal_class.parameters: (SensorContext context)
focal_class.return: void
focal_class.signature: void execute(SensorContext context)
focal_class.class_method_signature: PHPSensor.inSonarLint(SensorContext context)
focal_class.full_signature: private static boolean inSonarLint(SensorContext context)
focal_class.identifier: inSonarLint
focal_class.modifiers: private static
focal_class.parameters: (SensorContext context)
focal_class.return: boolean
focal_class.signature: boolean inSonarLint(SensorContext context)
focal_class.class_method_signature: PHPSensor.processTestsAndCoverage(SensorContext context)
focal_class.full_signature: private static void processTestsAndCoverage(SensorContext context)
focal_class.identifier: processTestsAndCoverage
focal_class.modifiers: private static
focal_class.parameters: (SensorContext context)
focal_class.return: void
focal_class.signature: void processTestsAndCoverage(SensorContext context)
focal_class.class_method_signature: PHPSensor.checkInterrupted(Exception e)
focal_class.full_signature: private static void checkInterrupted(Exception e)
focal_class.identifier: checkInterrupted
focal_class.modifiers: private static
focal_class.parameters: (Exception e)
focal_class.return: void
focal_class.signature: void checkInterrupted(Exception e)
focal_class.class_method_signature: PHPSensor.saveNewFileMeasures(SensorContext context, FileMeasures fileMeasures, InputFile inputFile)
focal_class.full_signature: private static void saveNewFileMeasures(SensorContext context, FileMeasures fileMeasures, InputFile inputFile)
focal_class.identifier: saveNewFileMeasures
focal_class.modifiers: private static
focal_class.parameters: (SensorContext context, FileMeasures fileMeasures, InputFile inputFile)
focal_class.return: void
focal_class.signature: void saveNewFileMeasures(SensorContext context, FileMeasures fileMeasures, InputFile inputFile)
focal_class.class_method_signature: PHPSensor.saveParsingIssue(SensorContext context, RecognitionException e, InputFile inputFile)
focal_class.full_signature: private void saveParsingIssue(SensorContext context, RecognitionException e, InputFile inputFile)
focal_class.identifier: saveParsingIssue
focal_class.modifiers: private
focal_class.parameters: (SensorContext context, RecognitionException e, InputFile inputFile)
focal_class.return: void
focal_class.signature: void saveParsingIssue(SensorContext context, RecognitionException e, InputFile inputFile)
focal_class.class_method_signature: PHPSensor.saveIssues(SensorContext context, List<PhpIssue> issues, InputFile inputFile)
focal_class.full_signature: private void saveIssues(SensorContext context, List<PhpIssue> issues, InputFile inputFile)
focal_class.identifier: saveIssues
focal_class.modifiers: private
focal_class.parameters: (SensorContext context, List<PhpIssue> issues, InputFile inputFile)
focal_class.return: void
focal_class.signature: void saveIssues(SensorContext context, List<PhpIssue> issues, InputFile inputFile)
focal_class.class_method_signature: PHPSensor.addSecondaryLocation(SensorContext context, InputFile inputFile, NewIssue newIssue, IssueLocation secondary)
focal_class.full_signature: private static void addSecondaryLocation(SensorContext context, InputFile inputFile, NewIssue newIssue, IssueLocation secondary)
focal_class.identifier: addSecondaryLocation
focal_class.modifiers: private static
focal_class.parameters: (SensorContext context, InputFile inputFile, NewIssue newIssue, IssueLocation secondary)
focal_class.return: void
focal_class.signature: void addSecondaryLocation(SensorContext context, InputFile inputFile, NewIssue newIssue, IssueLocation secondary)
focal_class.class_method_signature: PHPSensor.newLocation(InputFile inputFile, NewIssue issue, IssueLocation location)
focal_class.full_signature: private static NewIssueLocation newLocation(InputFile inputFile, NewIssue issue, IssueLocation location)
focal_class.identifier: newLocation
focal_class.modifiers: private static
focal_class.parameters: (InputFile inputFile, NewIssue issue, IssueLocation location)
focal_class.return: NewIssueLocation
focal_class.signature: NewIssueLocation newLocation(InputFile inputFile, NewIssue issue, IssueLocation location)
focal_class.class_method_signature: PHPSensor.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: PHPSensor.getParsingErrorRuleKey()
focal_class.full_signature: private RuleKey getParsingErrorRuleKey()
focal_class.identifier: getParsingErrorRuleKey
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: RuleKey
focal_class.signature: RuleKey getParsingErrorRuleKey()
focal_class.class_method_signature: PHPSensor.saveCpdData(List<CpdToken> cpdTokens, InputFile inputFile, SensorContext context)
focal_class.full_signature: private static void saveCpdData(List<CpdToken> cpdTokens, InputFile inputFile, SensorContext context)
focal_class.identifier: saveCpdData
focal_class.modifiers: private static
focal_class.parameters: (List<CpdToken> cpdTokens, InputFile inputFile, SensorContext context)
focal_class.return: void
focal_class.signature: void saveCpdData(List<CpdToken> cpdTokens, InputFile inputFile, SensorContext context)
focal_method.body: @Override
    public void execute(SensorContext context) {
      FileSystem fileSystem = context.fileSystem();
  
      FilePredicate phpFilePredicate = fileSystem.predicates().hasLanguage(Php.KEY);
  
      List<InputFile> inputFiles = new ArrayList<>();
      fileSystem.inputFiles(phpFilePredicate).forEach(inputFiles::add);
  
      SymbolScanner symbolScanner = new SymbolScanner(context);
  
      try {
        symbolScanner.execute(inputFiles);
        ProjectSymbolData projectSymbolData = symbolScanner.getProjectSymbolData();
        new AnalysisScanner(context, projectSymbolData).execute(inputFiles);
        if (!inSonarLint(context)) {
          processTestsAndCoverage(context);
        }
      } catch (CancellationException e) {
        LOG.info(e.getMessage());
      }
    }
focal_method.class_method_signature: PHPSensor.execute(SensorContext context)
focal_method.full_signature: @Override public void execute(SensorContext context)
focal_method.identifier: execute
focal_method.invocations: fileSystem hasLanguage predicates forEach inputFiles execute getProjectSymbolData execute inSonarLint processTestsAndCoverage info getMessage
focal_method.modifiers: @Override public
focal_method.parameters: (SensorContext context)
focal_method.return: void
focal_method.signature: void execute(SensorContext context)