Skip to content

Commit

Permalink
Revert "SONARPHP-1607 Replace call to deprecated sonar-api method (#1350
Browse files Browse the repository at this point in the history
)"

This reverts commit 58cb759.
  • Loading branch information
jonas-wielage-sonarsource authored Dec 20, 2024
1 parent 58cb759 commit 46dc50f
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.sonar.api.Plugin;
import org.sonar.api.SonarProduct;
import org.sonar.api.config.PropertyDefinition;
import org.sonar.api.config.PropertyDefinition.ConfigScope;
import org.sonar.api.resources.Qualifiers;
import org.sonar.plugins.php.api.Php;
import org.sonar.plugins.php.reports.phpstan.PhpStanRulesDefinition;
import org.sonar.plugins.php.reports.phpstan.PhpStanSensor;
Expand Down Expand Up @@ -67,7 +67,7 @@ public void define(Context context) {
.defaultValue(Php.DEFAULT_FILE_SUFFIXES)
.name("File Suffixes")
.description("List of suffixes of PHP files to analyze.")
.onConfigScopes(ConfigScope.PROJECT)
.onQualifiers(Qualifiers.PROJECT)
.category(PHP_CATEGORY)
.multiValues(true)
.subCategory(GENERAL_SUBCATEGORY)
Expand All @@ -77,7 +77,7 @@ public void define(Context context) {
.defaultValue(PHP_EXCLUSIONS_DEFAULT_VALUE)
.name("PHP Exclusions")
.description("List of file path patterns to be excluded from analysis of PHP files.")
.onConfigScopes(ConfigScope.PROJECT)
.onQualifiers(Qualifiers.PROJECT)
.category(PHP_CATEGORY)
.subCategory(GENERAL_SUBCATEGORY)
.multiValues(true)
Expand All @@ -87,7 +87,7 @@ public void define(Context context) {
.defaultValue(PHP_FRAMEWORK_DETECTION_DEFAULT_VALUE)
.name("PHP Framework detection")
.description("Enable the detection of PHP framework in analyzed file, which adapt some rules behavior.")
.onConfigScopes(ConfigScope.PROJECT)
.onQualifiers(Qualifiers.PROJECT)
.category(PHP_CATEGORY)
.subCategory(GENERAL_SUBCATEGORY)
.build());
Expand All @@ -106,15 +106,15 @@ private static void addPhpUnitExtensions(Context context) {
PropertyDefinition.builder(PHPUNIT_TESTS_REPORT_PATH_KEY)
.name("Unit Test Report")
.description("Comma-separated list of paths to PHPUnit unit test execution report files. Paths may be either absolute or relative to the project base directory.")
.onConfigScopes(ConfigScope.PROJECT)
.onQualifiers(Qualifiers.PROJECT)
.category(PHP_CATEGORY)
.multiValues(true)
.subCategory(PHPUNIT_SUBCATEGORY)
.build(),
PropertyDefinition.builder(PHPUNIT_COVERAGE_REPORT_PATHS_KEY)
.name("Coverage Reports")
.description("List of PHPUnit code coverage report files. Each path can be either absolute or relative.")
.onConfigScopes(ConfigScope.PROJECT)
.onQualifiers(Qualifiers.PROJECT)
.category(PHP_CATEGORY)
.multiValues(true)
.subCategory(PHPUNIT_SUBCATEGORY)
Expand All @@ -130,7 +130,7 @@ private static void addPhpStanExtensions(Context context) {
.description("Paths (absolute or relative) to report files with PHPStan issues.")
.category(EXTERNAL_ANALYZERS_SUBCATEGORY)
.subCategory(PHP_CATEGORY)
.onConfigScopes(ConfigScope.PROJECT)
.onQualifiers(Qualifiers.PROJECT)
.multiValues(true)
.build());
}
Expand All @@ -144,7 +144,7 @@ private static void addPsalmExtensions(Context context) {
.description("Paths (absolute or relative) to report files with Psalm issues.")
.category(EXTERNAL_ANALYZERS_SUBCATEGORY)
.subCategory(PHP_CATEGORY)
.onConfigScopes(ConfigScope.PROJECT)
.onQualifiers(Qualifiers.PROJECT)
.multiValues(true)
.build());
}
Expand Down

0 comments on commit 46dc50f

Please sign in to comment.