diff --git a/core.phpcs.xml.dist b/core.phpcs.xml.dist
index b603987bf35893030d64ce0fe8a806cef6f7127f..56abaf1edc7fa06547ed7e2beddb34b31a552011 100644
--- a/core.phpcs.xml.dist
+++ b/core.phpcs.xml.dist
@@ -61,7 +61,9 @@
       TagsNotGrouped, ParamGroup -->
     <exclude name="Drupal.Commenting.DocComment.LongFullStop"/>
     <exclude name="Drupal.Commenting.DocComment.MissingShort"/>
-    <exclude name="Drupal.Commenting.DocComment.ShortNotCapital"/>
+  </rule>
+  <rule ref="Drupal.Commenting.DocComment">
+    <exclude-pattern>core/tests/*</exclude-pattern>
   </rule>
   <rule ref="Drupal.Commenting.DocCommentAlignment"/>
   <rule ref="Drupal.Commenting.DocCommentLongArraySyntax"/>
@@ -82,6 +84,7 @@
     <include-pattern>core/modules/*/Plugin/views/style/*</include-pattern>
     <include-pattern>*/Database/*</include-pattern>
     <include-pattern>*/FunctionalJavascript/*</include-pattern>
+    <include-pattern>*/Kernel/*</include-pattern>
     <include-pattern>*/Functional/*</include-pattern>
   </rule>
   <rule ref="Drupal.Commenting.FunctionComment.MissingParamType"/>
diff --git a/tests/src/FunctionalJavascript/ProjectBrowserUiJsonApiTest.php b/tests/src/FunctionalJavascript/ProjectBrowserUiJsonApiTest.php
index b0346a1896b5da14e536e2009734a585752329ee..4077dc64e1a11eb3e0b0fda0663c7627e2f350e9 100644
--- a/tests/src/FunctionalJavascript/ProjectBrowserUiJsonApiTest.php
+++ b/tests/src/FunctionalJavascript/ProjectBrowserUiJsonApiTest.php
@@ -59,8 +59,6 @@ final class ProjectBrowserUiJsonApiTest extends WebDriverTestBase {
     // Fake the Drupal version.
     $this->container->get('state')->set('project_browser:test_deprecated_api', TRUE);
 
-    $assert_session = $this->assertSession();
-
     $this->drupalGet('admin/modules/browse/drupalorg_jsonapi');
     $this->svelteInitHelper('text', 'Unsupported version');
   }