From b450cb38f28396c0ce849612f5e83d30bd313d7d Mon Sep 17 00:00:00 2001 From: nod_ <nod_@598310.no-reply.drupal.org> Date: Fri, 31 Jan 2025 10:16:06 +0100 Subject: [PATCH] Issue #3477599 by quietone: Fix Drupal.Commenting.VariableComment.Missing --- core/modules/block/tests/src/Functional/BlockUiTest.php | 2 -- .../locale/tests/src/Functional/LocaleUpdateCronTest.php | 1 - .../Functional/NavigationTopBarContentModerationTest.php | 3 +++ .../tests/src/Functional/FailureMarkerRequirementTest.php | 2 +- .../Kernel/PathExcluder/SiteConfigurationExcluderTest.php | 3 +++ .../tests/src/Functional/Extension/LegacyHookTest.php | 6 ++++++ .../system/tests/src/Functional/System/PageTitleTest.php | 1 - .../tests/src/Kernel/Views/HandlerFilterPermissionTest.php | 1 - core/phpcs.xml.dist | 5 ----- 9 files changed, 13 insertions(+), 11 deletions(-) diff --git a/core/modules/block/tests/src/Functional/BlockUiTest.php b/core/modules/block/tests/src/Functional/BlockUiTest.php index 647eadc165a5..76bc4f86f91c 100644 --- a/core/modules/block/tests/src/Functional/BlockUiTest.php +++ b/core/modules/block/tests/src/Functional/BlockUiTest.php @@ -34,8 +34,6 @@ class BlockUiTest extends BrowserTestBase { */ protected $defaultTheme = 'stark'; - protected $regions; - /** * The submitted block values used by this test. * diff --git a/core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php b/core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php index 7d0706157b45..f0ab40d31cb0 100644 --- a/core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php +++ b/core/modules/locale/tests/src/Functional/LocaleUpdateCronTest.php @@ -16,7 +16,6 @@ class LocaleUpdateCronTest extends LocaleUpdateBase { use CronRunTrait; - protected $batchOutput = []; /** * {@inheritdoc} diff --git a/core/modules/navigation/tests/src/Functional/NavigationTopBarContentModerationTest.php b/core/modules/navigation/tests/src/Functional/NavigationTopBarContentModerationTest.php index 3ce3463d7c9a..1d0fa3c4dd5d 100644 --- a/core/modules/navigation/tests/src/Functional/NavigationTopBarContentModerationTest.php +++ b/core/modules/navigation/tests/src/Functional/NavigationTopBarContentModerationTest.php @@ -14,6 +14,9 @@ */ class NavigationTopBarContentModerationTest extends ModerationStateTestBase { + /** + * {@inheritdoc} + */ protected $defaultTheme = 'stark'; /** diff --git a/core/modules/package_manager/tests/src/Functional/FailureMarkerRequirementTest.php b/core/modules/package_manager/tests/src/Functional/FailureMarkerRequirementTest.php index aac2498a9375..46e3a68caa44 100644 --- a/core/modules/package_manager/tests/src/Functional/FailureMarkerRequirementTest.php +++ b/core/modules/package_manager/tests/src/Functional/FailureMarkerRequirementTest.php @@ -51,7 +51,7 @@ public function __construct() {} /** * {@inheritdoc} */ - // phpcs:ignore DrupalPractice.CodeAnalysis.VariableAnalysis.UnusedVariable + // phpcs:ignore DrupalPractice.CodeAnalysis.VariableAnalysis.UnusedVariable, Drupal.Commenting.VariableComment.Missing protected string $type = 'test'; }; $failure_marker->write($stage, $message); diff --git a/core/modules/package_manager/tests/src/Kernel/PathExcluder/SiteConfigurationExcluderTest.php b/core/modules/package_manager/tests/src/Kernel/PathExcluder/SiteConfigurationExcluderTest.php index cb347e55c12f..c513afb3097d 100644 --- a/core/modules/package_manager/tests/src/Kernel/PathExcluder/SiteConfigurationExcluderTest.php +++ b/core/modules/package_manager/tests/src/Kernel/PathExcluder/SiteConfigurationExcluderTest.php @@ -115,6 +115,9 @@ public function testDefaultSiteDirectoryPermissions(): void { */ class TestSiteConfigurationExcluder extends SiteConfigurationExcluder { + /** + * The site path. + */ public string $sitePath; } diff --git a/core/modules/system/tests/src/Functional/Extension/LegacyHookTest.php b/core/modules/system/tests/src/Functional/Extension/LegacyHookTest.php index 6d76153501ae..75045ecad4cc 100644 --- a/core/modules/system/tests/src/Functional/Extension/LegacyHookTest.php +++ b/core/modules/system/tests/src/Functional/Extension/LegacyHookTest.php @@ -13,8 +13,14 @@ */ class LegacyHookTest extends BrowserTestBase { + /** + * {@inheritdoc} + */ protected static $modules = ['legacy_hook_test']; + /** + * {@inheritdoc} + */ protected $defaultTheme = 'stark'; public function testLegacyHook(): void { diff --git a/core/modules/system/tests/src/Functional/System/PageTitleTest.php b/core/modules/system/tests/src/Functional/System/PageTitleTest.php index 0928f535bad2..bb16d6485a42 100644 --- a/core/modules/system/tests/src/Functional/System/PageTitleTest.php +++ b/core/modules/system/tests/src/Functional/System/PageTitleTest.php @@ -30,7 +30,6 @@ class PageTitleTest extends BrowserTestBase { * The test user. */ protected $contentUser; - protected $savedTitle; /** * Implement setUp(). diff --git a/core/modules/user/tests/src/Kernel/Views/HandlerFilterPermissionTest.php b/core/modules/user/tests/src/Kernel/Views/HandlerFilterPermissionTest.php index 9cb16c0a901c..afb0c0ae91c9 100644 --- a/core/modules/user/tests/src/Kernel/Views/HandlerFilterPermissionTest.php +++ b/core/modules/user/tests/src/Kernel/Views/HandlerFilterPermissionTest.php @@ -21,7 +21,6 @@ class HandlerFilterPermissionTest extends UserKernelTestBase { * @var array */ public static $testViews = ['test_filter_permission']; - protected $columnMap; /** * Tests the permission filter handler. diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist index bd8ff3e6d62f..b3de81b4fc91 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -109,11 +109,6 @@ <!-- Sniff for: DuplicateVar, EmptyVar, IncorrectVarType, InlineVariableName, WrongStyle --> <exclude name="Drupal.Commenting.VariableComment.MissingVar"/> </rule> - <rule ref="Drupal.Commenting.VariableComment.Missing"> - <include-pattern>./core/tests/*</include-pattern> - <exclude-pattern>./core/*/tests/*</exclude-pattern> - <include-pattern>core/modules/*/tests/modules/*</include-pattern> - </rule> <rule ref="Drupal.ControlStructures.ControlSignature"/> <rule ref="Drupal.ControlStructures.ElseIf"/> <rule ref="Drupal.ControlStructures.InlineControlStructure"/> -- GitLab