From e25e01aab8a33596bcb285581588dff53845f666 Mon Sep 17 00:00:00 2001
From: Lee Rowlands <lee.rowlands@previousnext.com.au>
Date: Thu, 19 Dec 2024 12:42:09 +1000
Subject: [PATCH] Issue #2842949 by quietone, rigoucr, arunkumark,
 gaurav.kapoor, timmillwood, harsha012: Fix
 Drupal.Commenting.DocComment.SpacingBeforeTags coding standard

---
 core/lib/Drupal/Component/Utility/Html.php             |  1 +
 core/lib/Drupal/Core/Asset/AssetResolverInterface.php  |  1 +
 .../Core/Cache/Context/CacheContextInterface.php       |  1 -
 .../Drupal/Core/Config/Entity/ConfigEntityUpdater.php  |  1 +
 core/lib/Drupal/Core/Database/Query/Select.php         |  1 +
 core/lib/Drupal/Core/Entity/EntityInterface.php        |  1 +
 .../Core/Entity/TranslatableRevisionableInterface.php  |  2 ++
 core/lib/Drupal/Core/Field/FieldConfigBase.php         |  1 +
 core/lib/Drupal/Core/Render/Element/Email.php          |  1 +
 core/lib/Drupal/Core/Render/Element/HtmlTag.php        |  1 +
 core/lib/Drupal/Core/Render/Element/Pager.php          |  1 -
 core/lib/Drupal/Core/Render/Element/Select.php         |  1 +
 .../Drupal/Core/Render/MainContent/HtmlRenderer.php    |  5 ++++-
 .../Drupal/Core/Template/Loader/FilesystemLoader.php   |  2 +-
 core/lib/Drupal/Core/TypedData/DataDefinition.php      |  4 ++++
 .../block_test/src/Plugin/Block/TestAccessBlock.php    |  1 -
 .../tests/src/Functional/BlockContentRevisionsTest.php |  2 ++
 .../tests/config_test/src/Entity/ConfigQueryTest.php   |  1 -
 .../src/Entity/ContentModerationState.php              |  1 -
 core/modules/editor/src/EditorInterface.php            |  1 +
 .../tests/src/FunctionalJavascript/EditorAdminTest.php |  1 +
 core/modules/field/src/Entity/FieldStorageConfig.php   |  1 +
 .../src/Functional/FileFieldFormatterAccessTest.php    |  1 +
 core/modules/jsonapi/tests/src/Functional/UserTest.php |  1 +
 .../tests/src/Kernel/EntityUrlLanguageTest.php         |  1 +
 .../locale/src/StreamWrapper/TranslationsStream.php    |  1 +
 .../src/Plugin/migrate/destination/EntityViewMode.php  |  1 +
 .../migrate/tests/src/Unit/process/UrlEncodeTest.php   |  1 +
 .../src/Plugin/migrate/field/d6/UserReference.php      |  1 +
 .../src/Plugin/migrate/source/d7/FieldableEntity.php   |  1 +
 .../Unit/Normalizer/DateTimeIso8601NormalizerTest.php  |  1 +
 .../src/Unit/Normalizer/DateTimeNormalizerTest.php     |  1 +
 .../src/Unit/Normalizer/TimestampNormalizerTest.php    |  1 +
 .../src/Driver/Database/sqlite/Install/Tasks.php       |  1 +
 .../src/Controller/ThemeInstallController.php          |  1 +
 .../tests/src/Kernel/Module/RequirementsTest.php       |  1 +
 .../src/Controller/UserAuthenticationController.php    |  1 +
 .../user/src/Plugin/migrate/destination/EntityUser.php |  1 +
 core/modules/user/user.module                          |  1 +
 .../views/src/EventSubscriber/RouteSubscriber.php      |  1 -
 .../views/src/Plugin/views/access/AccessPluginBase.php |  3 +++
 .../src/Plugin/views/argument/ArgumentPluginBase.php   |  1 +
 .../src/Plugin/views/argument/NumericArgument.php      |  2 ++
 .../views/src/Plugin/views/field/MachineName.php       |  1 +
 core/modules/views/src/Plugin/views/style/Table.php    |  2 ++
 core/phpcs.xml.dist                                    |  1 -
 .../InstallerNonDefaultDatabaseDriverTest.php          |  1 +
 .../KernelTests/Core/DrupalKernel/DrupalKernelTest.php |  1 +
 .../Component/DependencyInjection/ContainerTest.php    |  2 ++
 .../PhpStorage/MTimeProtectedFileStorageBase.php       |  1 +
 .../Drupal/Tests/Core/Cache/CacheCollectorHelper.php   |  1 +
 .../CustomPageExceptionHtmlSubscriberTest.php          |  1 +
 .../Drupal/Tests/Core/Lock/LockBackendAbstractTest.php |  1 +
 .../tests/Drupal/Tests/Core/Path/PathValidatorTest.php |  1 +
 .../Discovery/TestDerivativeDiscoveryWithObject.php    | 10 ----------
 .../Core/StringTranslation/TranslationManagerTest.php  |  1 +
 .../tests/Drupal/Tests/Core/Template/AttributeTest.php |  7 +++++++
 .../Drupal/Tests/Core/Test/JUnitConverterTest.php      |  1 +
 58 files changed, 69 insertions(+), 19 deletions(-)

diff --git a/core/lib/Drupal/Component/Utility/Html.php b/core/lib/Drupal/Component/Utility/Html.php
index 193f01b21fa9..b9590c2a2320 100644
--- a/core/lib/Drupal/Component/Utility/Html.php
+++ b/core/lib/Drupal/Component/Utility/Html.php
@@ -28,6 +28,7 @@ class Html {
 
   /**
    * An array of IDs, including incremented versions when an ID is duplicated.
+   *
    * @var array
    */
   protected static $seenIds;
diff --git a/core/lib/Drupal/Core/Asset/AssetResolverInterface.php b/core/lib/Drupal/Core/Asset/AssetResolverInterface.php
index 0fac59ca44ac..19a43c1948a5 100644
--- a/core/lib/Drupal/Core/Asset/AssetResolverInterface.php
+++ b/core/lib/Drupal/Core/Asset/AssetResolverInterface.php
@@ -29,6 +29,7 @@ interface AssetResolverInterface {
    * - CSS_COMPONENT
    * - CSS_STATE
    * - CSS_THEME
+   *
    * @see https://www.drupal.org/node/1887918#separate-concerns
    * This ensures proper cascading of styles so themes can easily override
    * module styles through CSS selectors.
diff --git a/core/lib/Drupal/Core/Cache/Context/CacheContextInterface.php b/core/lib/Drupal/Core/Cache/Context/CacheContextInterface.php
index b7538fa67d03..3c50b498e78a 100644
--- a/core/lib/Drupal/Core/Cache/Context/CacheContextInterface.php
+++ b/core/lib/Drupal/Core/Cache/Context/CacheContextInterface.php
@@ -37,7 +37,6 @@ public function getContext();
    *   if this is optimized away to allow for invalidation if the context
    *   value changes.
    *
-   *
    * @return \Drupal\Core\Cache\CacheableMetadata
    *   A cacheable metadata object.
    */
diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityUpdater.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityUpdater.php
index bd3128fe19d4..e6f535a0eee0 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityUpdater.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityUpdater.php
@@ -42,6 +42,7 @@ class ConfigEntityUpdater implements ContainerInjectionInterface {
 
   /**
    * The number of entities to process in each batch.
+   *
    * @var int
    */
   protected $batchSize;
diff --git a/core/lib/Drupal/Core/Database/Query/Select.php b/core/lib/Drupal/Core/Database/Query/Select.php
index 290cbbf487c9..bf8414aebc3a 100644
--- a/core/lib/Drupal/Core/Database/Query/Select.php
+++ b/core/lib/Drupal/Core/Database/Query/Select.php
@@ -107,6 +107,7 @@ class Select extends Query implements SelectInterface {
 
   /**
    * Indicates if preExecute() has already been called.
+   *
    * @var bool
    */
   protected $prepared = FALSE;
diff --git a/core/lib/Drupal/Core/Entity/EntityInterface.php b/core/lib/Drupal/Core/Entity/EntityInterface.php
index 1547a3879e39..cb6292333dff 100644
--- a/core/lib/Drupal/Core/Entity/EntityInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityInterface.php
@@ -239,6 +239,7 @@ public function delete();
    * over all translations if needed. This is different from its counterpart in
    * the Field API, FieldItemListInterface::preSave(), which is fired on all
    * field translations automatically.
+   *
    * @todo Adjust existing implementations and the documentation according to
    *   https://www.drupal.org/node/2577609 to have a consistent API.
    *
diff --git a/core/lib/Drupal/Core/Entity/TranslatableRevisionableInterface.php b/core/lib/Drupal/Core/Entity/TranslatableRevisionableInterface.php
index 7460eeb16b6c..98c390ce420b 100644
--- a/core/lib/Drupal/Core/Entity/TranslatableRevisionableInterface.php
+++ b/core/lib/Drupal/Core/Entity/TranslatableRevisionableInterface.php
@@ -23,6 +23,7 @@ public function isLatestTranslationAffectedRevision();
    * through the field directly will always enforce it, which will be used by
    * the entity storage to determine if the flag should be recomputed or the set
    * value should be used instead.
+   *
    * @see \Drupal\Core\Entity\ContentEntityStorageBase::populateAffectedRevisionTranslations()
    *
    * @param bool|null $affected
@@ -58,6 +59,7 @@ public function isRevisionTranslationAffectedEnforced();
    * Note that this method call will not have any influence on the storage if
    * the value of the revision translation affected flag is NULL which is used
    * as an indication for the storage to recompute the flag.
+   *
    * @see \Drupal\Core\Entity\ContentEntityInterface::setRevisionTranslationAffected()
    *
    * @param bool $enforced
diff --git a/core/lib/Drupal/Core/Field/FieldConfigBase.php b/core/lib/Drupal/Core/Field/FieldConfigBase.php
index 2a1759658746..39405c37d437 100644
--- a/core/lib/Drupal/Core/Field/FieldConfigBase.php
+++ b/core/lib/Drupal/Core/Field/FieldConfigBase.php
@@ -472,6 +472,7 @@ public function setDefaultValueCallback($callback) {
    *
    * Using the Serialize interface and serialize() / unserialize() methods
    * breaks entity forms in PHP 5.4.
+   *
    * @todo Investigate in https://www.drupal.org/node/1977206.
    */
   public function __sleep(): array {
diff --git a/core/lib/Drupal/Core/Render/Element/Email.php b/core/lib/Drupal/Core/Render/Element/Email.php
index 197b500038f3..fd721eb36576 100644
--- a/core/lib/Drupal/Core/Render/Element/Email.php
+++ b/core/lib/Drupal/Core/Render/Element/Email.php
@@ -35,6 +35,7 @@ class Email extends FormElementBase {
    * specifies a total length of 320 characters, but mentions that
    * addresses longer than 256 characters are not normally useful. Erratum
    * 1690 was then released which corrected this value to 254 characters.
+   *
    * @see http://tools.ietf.org/html/rfc3696#section-3
    * @see http://www.rfc-editor.org/errata_search.php?rfc=3696&eid=1690
    */
diff --git a/core/lib/Drupal/Core/Render/Element/HtmlTag.php b/core/lib/Drupal/Core/Render/Element/HtmlTag.php
index 48b924600c14..0d69b2f0706f 100644
--- a/core/lib/Drupal/Core/Render/Element/HtmlTag.php
+++ b/core/lib/Drupal/Core/Render/Element/HtmlTag.php
@@ -37,6 +37,7 @@ class HtmlTag extends RenderElementBase {
 
   /**
    * Void elements do not contain values or closing tags.
+   *
    * @see https://www.w3.org/TR/html5/syntax.html#syntax-start-tag
    * @see https://www.w3.org/TR/html5/syntax.html#void-elements
    */
diff --git a/core/lib/Drupal/Core/Render/Element/Pager.php b/core/lib/Drupal/Core/Render/Element/Pager.php
index 795909e5997f..1977b5bf6d39 100644
--- a/core/lib/Drupal/Core/Render/Element/Pager.php
+++ b/core/lib/Drupal/Core/Render/Element/Pager.php
@@ -64,7 +64,6 @@ public function getInfo() {
   /**
    * #pre_render callback to associate the appropriate cache context.
    *
-   *
    * @param array $pager
    *   A renderable array of #type => pager.
    *
diff --git a/core/lib/Drupal/Core/Render/Element/Select.php b/core/lib/Drupal/Core/Render/Element/Select.php
index 5d328ace1df6..79a6a514057e 100644
--- a/core/lib/Drupal/Core/Render/Element/Select.php
+++ b/core/lib/Drupal/Core/Render/Element/Select.php
@@ -48,6 +48,7 @@
  *     since all user agents automatically preselect the first available
  *     option. But people are used to this being the behavior of select
  *     controls.
+ *
  *     @todo Address the above issue in Drupal 8.
  *   - If #required is not TRUE and this value is set (most commonly to an
  *     empty string), then an extra option (see #empty_option above)
diff --git a/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php b/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php
index b0cce3f25519..bcceafabee1f 100644
--- a/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php
+++ b/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php
@@ -22,7 +22,10 @@
 /**
  * Default main content renderer for HTML requests.
  *
- * For attachment handling of HTML responses:
+ * Attachments in HTML responses are handled by
+ * \Drupal\Core\Render\AttachmentsResponseProcessorInterface and
+ * \Drupal\Core\Render\HtmlResponseAttachmentsProcessor
+ *
  * @see template_preprocess_html()
  * @see \Drupal\Core\Render\AttachmentsResponseProcessorInterface
  * @see \Drupal\Core\Render\BareHtmlPageRenderer
diff --git a/core/lib/Drupal/Core/Template/Loader/FilesystemLoader.php b/core/lib/Drupal/Core/Template/Loader/FilesystemLoader.php
index e9620f6a57ba..22a73ef3be15 100644
--- a/core/lib/Drupal/Core/Template/Loader/FilesystemLoader.php
+++ b/core/lib/Drupal/Core/Template/Loader/FilesystemLoader.php
@@ -12,7 +12,7 @@
  *
  * This loader adds module and theme template paths as namespaces to the Twig
  * filesystem loader so that templates can be referenced by namespace, like
- * @block/block.html.twig or @my_theme/page.html.twig.
+ * "@block/block.html.twig" or "@my_theme/page.html.twig".
  */
 class FilesystemLoader extends TwigFilesystemLoader {
 
diff --git a/core/lib/Drupal/Core/TypedData/DataDefinition.php b/core/lib/Drupal/Core/TypedData/DataDefinition.php
index 3ad365847368..48058e33ceba 100644
--- a/core/lib/Drupal/Core/TypedData/DataDefinition.php
+++ b/core/lib/Drupal/Core/TypedData/DataDefinition.php
@@ -312,6 +312,7 @@ public function addConstraint($constraint_name, $options = NULL) {
    * {@inheritdoc}
    *
    * This is for BC support only.
+   *
    * @todo Remove in https://www.drupal.org/node/1928868.
    */
   public function offsetExists($offset): bool {
@@ -324,6 +325,7 @@ public function offsetExists($offset): bool {
    * {@inheritdoc}
    *
    * This is for BC support only.
+   *
    * @todo Remove in https://www.drupal.org/node/1928868.
    */
   public function &offsetGet($offset): mixed {
@@ -337,6 +339,7 @@ public function &offsetGet($offset): mixed {
    * {@inheritdoc}
    *
    * This is for BC support only.
+   *
    * @todo Remove in https://www.drupal.org/node/1928868.
    */
   public function offsetSet($offset, $value): void {
@@ -347,6 +350,7 @@ public function offsetSet($offset, $value): void {
    * {@inheritdoc}
    *
    * This is for BC support only.
+   *
    * @todo Remove in https://www.drupal.org/node/1928868.
    */
   public function offsetUnset($offset): void {
diff --git a/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestAccessBlock.php b/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestAccessBlock.php
index 6a6bb175b62f..7fbb6099ee2f 100644
--- a/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestAccessBlock.php
+++ b/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestAccessBlock.php
@@ -31,7 +31,6 @@ class TestAccessBlock extends BlockBase implements ContainerFactoryPluginInterfa
   /**
    * Tests the test access block.
    *
-   *
    * @param array $configuration
    *   The plugin configuration, i.e. an array with configuration values keyed
    *   by configuration option name. The special key 'context' may be used to
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentRevisionsTest.php b/core/modules/block_content/tests/src/Functional/BlockContentRevisionsTest.php
index a58d770221b4..2ca1905f914b 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentRevisionsTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentRevisionsTest.php
@@ -21,12 +21,14 @@ class BlockContentRevisionsTest extends BlockContentTestBase {
 
   /**
    * Stores blocks created during the test.
+   *
    * @var array
    */
   protected $blocks;
 
   /**
    * Stores log messages used during the test.
+   *
    * @var array
    */
   protected $revisionLogs;
diff --git a/core/modules/config/tests/config_test/src/Entity/ConfigQueryTest.php b/core/modules/config/tests/config_test/src/Entity/ConfigQueryTest.php
index 0e36c3d58f93..f5b27db25532 100644
--- a/core/modules/config/tests/config_test/src/Entity/ConfigQueryTest.php
+++ b/core/modules/config/tests/config_test/src/Entity/ConfigQueryTest.php
@@ -13,7 +13,6 @@
 /**
  * Defines the ConfigQueryTest configuration entity used by the query test.
  *
- *
  * @see \Drupal\system\Tests\Entity\ConfigEntityQueryTest
  */
 #[ConfigEntityType(
diff --git a/core/modules/content_moderation/src/Entity/ContentModerationState.php b/core/modules/content_moderation/src/Entity/ContentModerationState.php
index 85ef09931856..074e9f3cbc6a 100644
--- a/core/modules/content_moderation/src/Entity/ContentModerationState.php
+++ b/core/modules/content_moderation/src/Entity/ContentModerationState.php
@@ -17,7 +17,6 @@
 /**
  * Defines the Content moderation state entity.
  *
- *
  * @internal
  *   This entity is marked internal because it should not be used directly to
  *   alter the moderation state of an entity. Instead, the computed
diff --git a/core/modules/editor/src/EditorInterface.php b/core/modules/editor/src/EditorInterface.php
index 55ae4a19b6f4..fe72613a70b7 100644
--- a/core/modules/editor/src/EditorInterface.php
+++ b/core/modules/editor/src/EditorInterface.php
@@ -24,6 +24,7 @@ public function hasAssociatedFilterFormat();
    * Returns the filter format this text editor is associated with.
    *
    * This could be NULL if the associated filter format is still being created.
+   *
    * @see hasAssociatedFilterFormat()
    *
    * @return \Drupal\filter\FilterFormatInterface|null
diff --git a/core/modules/editor/tests/src/FunctionalJavascript/EditorAdminTest.php b/core/modules/editor/tests/src/FunctionalJavascript/EditorAdminTest.php
index 9bebf303a558..c48eef11ae87 100644
--- a/core/modules/editor/tests/src/FunctionalJavascript/EditorAdminTest.php
+++ b/core/modules/editor/tests/src/FunctionalJavascript/EditorAdminTest.php
@@ -75,6 +75,7 @@ public function testEditorSelection(): void {
    *
    * The order in which the different editors are selected is significant,
    * because the form state must change accordingly.
+   *
    * @see https://www.drupal.org/project/drupal/issues/3230829
    */
   public function testEditorCreation(): void {
diff --git a/core/modules/field/src/Entity/FieldStorageConfig.php b/core/modules/field/src/Entity/FieldStorageConfig.php
index 609787740268..b9cca0f1fa23 100644
--- a/core/modules/field/src/Entity/FieldStorageConfig.php
+++ b/core/modules/field/src/Entity/FieldStorageConfig.php
@@ -752,6 +752,7 @@ public function hasData() {
    *
    * Using the Serialize interface and serialize() / unserialize() methods
    * breaks entity forms in PHP 5.4.
+   *
    * @todo Investigate in https://www.drupal.org/node/1977206.
    */
   public function __sleep(): array {
diff --git a/core/modules/file/tests/src/Functional/FileFieldFormatterAccessTest.php b/core/modules/file/tests/src/Functional/FileFieldFormatterAccessTest.php
index b928e41f2b12..84c90917f63a 100644
--- a/core/modules/file/tests/src/Functional/FileFieldFormatterAccessTest.php
+++ b/core/modules/file/tests/src/Functional/FileFieldFormatterAccessTest.php
@@ -6,6 +6,7 @@
 
 /**
  * Tests file formatter access.
+ *
  * @group file
  */
 class FileFieldFormatterAccessTest extends FileFieldTestBase {
diff --git a/core/modules/jsonapi/tests/src/Functional/UserTest.php b/core/modules/jsonapi/tests/src/Functional/UserTest.php
index 552f7d05d889..bbedfecc140a 100644
--- a/core/modules/jsonapi/tests/src/Functional/UserTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/UserTest.php
@@ -690,6 +690,7 @@ public function testDeleteRespectsUserCancelBlockUnpublish(): void {
 
   /**
    * Tests if JSON:API respects user.settings.cancel_method: user_cancel_block_unpublish.
+   *
    * @group jsonapi
    */
   public function testDeleteRespectsUserCancelBlockUnpublishAndProcessesBatches(): void {
diff --git a/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php b/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php
index c904407d9794..47e33a37bf41 100644
--- a/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/EntityUrlLanguageTest.php
@@ -17,6 +17,7 @@
 
 /**
  * Tests the language of entity URLs.
+ *
  * @group language
  */
 class EntityUrlLanguageTest extends LanguageTestBase {
diff --git a/core/modules/locale/src/StreamWrapper/TranslationsStream.php b/core/modules/locale/src/StreamWrapper/TranslationsStream.php
index e7cb2788e768..dbdb85d2b38f 100644
--- a/core/modules/locale/src/StreamWrapper/TranslationsStream.php
+++ b/core/modules/locale/src/StreamWrapper/TranslationsStream.php
@@ -42,6 +42,7 @@ public function getDirectoryPath() {
 
   /**
    * Implements Drupal\Core\StreamWrapper\StreamWrapperInterface::getExternalUrl().
+   *
    * @throws \LogicException
    *   PO files URL should not be public.
    */
diff --git a/core/modules/migrate/src/Plugin/migrate/destination/EntityViewMode.php b/core/modules/migrate/src/Plugin/migrate/destination/EntityViewMode.php
index 14cea6058cf4..0909a6822716 100644
--- a/core/modules/migrate/src/Plugin/migrate/destination/EntityViewMode.php
+++ b/core/modules/migrate/src/Plugin/migrate/destination/EntityViewMode.php
@@ -8,6 +8,7 @@
  * Provides entity view mode destination plugin.
  *
  * See EntityConfigBase for the available configuration options.
+ *
  * @see \Drupal\migrate\Plugin\migrate\destination\EntityConfigBase
  *
  * Example:
diff --git a/core/modules/migrate/tests/src/Unit/process/UrlEncodeTest.php b/core/modules/migrate/tests/src/Unit/process/UrlEncodeTest.php
index c54ff69065cc..555b47ae76fc 100644
--- a/core/modules/migrate/tests/src/Unit/process/UrlEncodeTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/UrlEncodeTest.php
@@ -41,6 +41,7 @@ public static function urlDataProvider() {
 
   /**
    * Cover various encoding scenarios.
+   *
    * @dataProvider urlDataProvider
    */
   public function testUrls($input, $output): void {
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/field/d6/UserReference.php b/core/modules/migrate_drupal/src/Plugin/migrate/field/d6/UserReference.php
index 82366a34439b..9b663b5a9399 100644
--- a/core/modules/migrate_drupal/src/Plugin/migrate/field/d6/UserReference.php
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/field/d6/UserReference.php
@@ -10,6 +10,7 @@
 
 /**
  * MigrateField Plugin for Drupal 6 user reference fields.
+ *
  * @internal
  */
 #[MigrateField(
diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/source/d7/FieldableEntity.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/d7/FieldableEntity.php
index 2a639219a00e..89b92a6af388 100644
--- a/core/modules/migrate_drupal/src/Plugin/migrate/source/d7/FieldableEntity.php
+++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/d7/FieldableEntity.php
@@ -10,6 +10,7 @@
  * Field values are collected from the Field API.
  *
  * Refer to the existing implementations for examples:
+ *
  * @see \Drupal\node\Plugin\migrate\source\d7\Node
  * @see \Drupal\user\Plugin\migrate\source\d7\User
  *
diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeIso8601NormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeIso8601NormalizerTest.php
index a6089b3a31a6..59b01a1bbbd4 100644
--- a/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeIso8601NormalizerTest.php
+++ b/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeIso8601NormalizerTest.php
@@ -262,6 +262,7 @@ public function testDenormalizeNoTargetInstanceOrFieldDefinitionException(): voi
  *
  * Note: Prophecy does not support magic methods. By subclassing and specifying
  * an explicit method, Prophecy works.
+ *
  * @see https://github.com/phpspec/prophecy/issues/338
  * @see https://github.com/phpspec/prophecy/issues/34
  * @see https://github.com/phpspec/prophecy/issues/80
diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeNormalizerTest.php
index 2091f0279b6f..f12d82eaf166 100644
--- a/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeNormalizerTest.php
+++ b/core/modules/serialization/tests/src/Unit/Normalizer/DateTimeNormalizerTest.php
@@ -184,6 +184,7 @@ public function testDenormalizeException(): void {
  *
  * Note: Prophecy does not support magic methods. By subclassing and specifying
  * an explicit method, Prophecy works.
+ *
  * @see https://github.com/phpspec/prophecy/issues/338
  * @see https://github.com/phpspec/prophecy/issues/34
  * @see https://github.com/phpspec/prophecy/issues/80
diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/TimestampNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/TimestampNormalizerTest.php
index f5a172096ddc..398e458f4eb0 100644
--- a/core/modules/serialization/tests/src/Unit/Normalizer/TimestampNormalizerTest.php
+++ b/core/modules/serialization/tests/src/Unit/Normalizer/TimestampNormalizerTest.php
@@ -139,6 +139,7 @@ public function testDenormalizeException(): void {
  *
  * Note: Prophecy does not support magic methods. By subclassing and specifying
  * an explicit method, Prophecy works.
+ *
  * @see https://github.com/phpspec/prophecy/issues/338
  * @see https://github.com/phpspec/prophecy/issues/34
  * @see https://github.com/phpspec/prophecy/issues/80
diff --git a/core/modules/sqlite/src/Driver/Database/sqlite/Install/Tasks.php b/core/modules/sqlite/src/Driver/Database/sqlite/Install/Tasks.php
index 050dd2c3ceb6..c03e6226d2c4 100644
--- a/core/modules/sqlite/src/Driver/Database/sqlite/Install/Tasks.php
+++ b/core/modules/sqlite/src/Driver/Database/sqlite/Install/Tasks.php
@@ -16,6 +16,7 @@ class Tasks extends InstallTasks {
    * Minimum required SQLite version.
    *
    * Use to build sqlite library with json1 option for JSON datatype support.
+   *
    * @see https://www.sqlite.org/json1.html
    */
   const SQLITE_MINIMUM_VERSION = '3.45';
diff --git a/core/modules/system/tests/modules/nightwatch_theme_install_utility/src/Controller/ThemeInstallController.php b/core/modules/system/tests/modules/nightwatch_theme_install_utility/src/Controller/ThemeInstallController.php
index 93614cbfb441..68a6429c6023 100644
--- a/core/modules/system/tests/modules/nightwatch_theme_install_utility/src/Controller/ThemeInstallController.php
+++ b/core/modules/system/tests/modules/nightwatch_theme_install_utility/src/Controller/ThemeInstallController.php
@@ -59,6 +59,7 @@ public function installDefault(string $theme) {
 
   /**
    * Install a theme as the admin theme.
+   *
    * @param string $theme
    *   The theme to install as the admin theme.
    *
diff --git a/core/modules/system/tests/src/Kernel/Module/RequirementsTest.php b/core/modules/system/tests/src/Kernel/Module/RequirementsTest.php
index 9deed82b828e..2258b08bc494 100644
--- a/core/modules/system/tests/src/Kernel/Module/RequirementsTest.php
+++ b/core/modules/system/tests/src/Kernel/Module/RequirementsTest.php
@@ -8,6 +8,7 @@
 
 /**
  * Covers hook_requirements and hook_requirements_alter.
+ *
  * @group Module
  */
 class RequirementsTest extends KernelTestBase {
diff --git a/core/modules/user/src/Controller/UserAuthenticationController.php b/core/modules/user/src/Controller/UserAuthenticationController.php
index af31a878ddcc..39a79cbcf5dc 100644
--- a/core/modules/user/src/Controller/UserAuthenticationController.php
+++ b/core/modules/user/src/Controller/UserAuthenticationController.php
@@ -62,6 +62,7 @@ class UserAuthenticationController extends ControllerBase implements ContainerIn
 
   /**
    * The user authentication.
+   *
    * @var \Drupal\user\UserAuthInterface|\Drupal\user\UserAuthenticationInterface
    */
   protected $userAuth;
diff --git a/core/modules/user/src/Plugin/migrate/destination/EntityUser.php b/core/modules/user/src/Plugin/migrate/destination/EntityUser.php
index 18ff32256eea..e66ec9ee6a66 100644
--- a/core/modules/user/src/Plugin/migrate/destination/EntityUser.php
+++ b/core/modules/user/src/Plugin/migrate/destination/EntityUser.php
@@ -123,6 +123,7 @@ public static function create(ContainerInterface $container, array $configuratio
 
   /**
    * {@inheritdoc}
+   *
    * @throws \Drupal\migrate\MigrateException
    */
   public function import(Row $row, array $old_destination_id_values = []) {
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index 907fa44f56c9..a22c79094daa 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -387,6 +387,7 @@ function user_cancel($edit, $uid, $method) {
  *
  * Since batch and session API require a valid user account, the actual
  * cancellation of a user account needs to happen last.
+ *
  * @param array $edit
  *   An array of submitted form values.
  * @param \Drupal\user\UserInterface $account
diff --git a/core/modules/views/src/EventSubscriber/RouteSubscriber.php b/core/modules/views/src/EventSubscriber/RouteSubscriber.php
index 7cc6d56183ee..7a9d9b89f205 100644
--- a/core/modules/views/src/EventSubscriber/RouteSubscriber.php
+++ b/core/modules/views/src/EventSubscriber/RouteSubscriber.php
@@ -18,7 +18,6 @@
  * routes are overridden by views. This information is used to determine which
  * views have to be added by views in the dynamic event.
  *
- *
  * @see \Drupal\views\Plugin\views\display\PathPluginBase
  */
 class RouteSubscriber extends RouteSubscriberBase {
diff --git a/core/modules/views/src/Plugin/views/access/AccessPluginBase.php b/core/modules/views/src/Plugin/views/access/AccessPluginBase.php
index 9469cc361a5b..c1a39114691e 100644
--- a/core/modules/views/src/Plugin/views/access/AccessPluginBase.php
+++ b/core/modules/views/src/Plugin/views/access/AccessPluginBase.php
@@ -31,11 +31,14 @@
  * To define an access control plugin, extend this base class. Your access
  * plugin should have an annotation that includes the plugin's metadata, for
  * example:
+ * @code
  * @Plugin(
  *   id = "deny_all",
  *   title = @Translation("No Access"),
  *   help = @Translation("Will not be accessible.")
  * )
+ * @endcode
+ *
  * The definition should include the following keys:
  * - id: The unique identifier of your access plugin.
  * - title: The human-readable name for your access plugin.
diff --git a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
index 3279a33d6e53..e855bd577af3 100644
--- a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
+++ b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php
@@ -72,6 +72,7 @@ abstract class ArgumentPluginBase extends HandlerBase implements CacheableDepend
 
   /**
    * The table to use for the name, should it not be in the same table as the argument.
+   *
    * @var string
    */
   // phpcs:ignore Drupal.NamingConventions.ValidVariableName.LowerCamelName, Drupal.Commenting.VariableComment.Missing
diff --git a/core/modules/views/src/Plugin/views/argument/NumericArgument.php b/core/modules/views/src/Plugin/views/argument/NumericArgument.php
index 39bb662ec798..8d16ed8a0f3e 100644
--- a/core/modules/views/src/Plugin/views/argument/NumericArgument.php
+++ b/core/modules/views/src/Plugin/views/argument/NumericArgument.php
@@ -20,6 +20,7 @@ class NumericArgument extends ArgumentPluginBase {
 
   /**
    * The actual value which is used for querying.
+   *
    * @var array
    */
   public $value;
@@ -82,6 +83,7 @@ public function title() {
 
   /**
    * Override for specific title lookups.
+   *
    * @return array
    *   Returns all titles, if it's just one title it's an array with one entry.
    */
diff --git a/core/modules/views/src/Plugin/views/field/MachineName.php b/core/modules/views/src/Plugin/views/field/MachineName.php
index 216863fbb978..698fa80a7202 100644
--- a/core/modules/views/src/Plugin/views/field/MachineName.php
+++ b/core/modules/views/src/Plugin/views/field/MachineName.php
@@ -8,6 +8,7 @@
 
 /**
  * Field handler which allows to show machine name content as human name.
+ *
  * @ingroup views_field_handlers
  *
  * Definition items:
diff --git a/core/modules/views/src/Plugin/views/style/Table.php b/core/modules/views/src/Plugin/views/style/Table.php
index 62be3f85d478..56d6b0324260 100644
--- a/core/modules/views/src/Plugin/views/style/Table.php
+++ b/core/modules/views/src/Plugin/views/style/Table.php
@@ -52,12 +52,14 @@ class Table extends StylePluginBase implements CacheableDependencyInterface {
 
   /**
    * Contains the current active sort column.
+   *
    * @var string
    */
   public $active;
 
   /**
    * Contains the current active sort order, either desc or asc.
+   *
    * @var string
    */
   public $order;
diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist
index 39f75d81bcc6..da78f3435edc 100644
--- a/core/phpcs.xml.dist
+++ b/core/phpcs.xml.dist
@@ -60,7 +60,6 @@
     <exclude name="Drupal.Commenting.DocComment.MissingShort"/>
     <exclude name="Drupal.Commenting.DocComment.ParamNotFirst"/>
     <exclude name="Drupal.Commenting.DocComment.ShortNotCapital"/>
-    <exclude name="Drupal.Commenting.DocComment.SpacingBeforeTags"/>
   </rule>
   <rule ref="Drupal.Commenting.DocCommentAlignment"/>
   <rule ref="Drupal.Commenting.DocCommentLongArraySyntax"/>
diff --git a/core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php b/core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php
index a86621f83a24..cf8fb43c43fc 100644
--- a/core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php
+++ b/core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php
@@ -25,6 +25,7 @@ class InstallerNonDefaultDatabaseDriverTest extends InstallerTestBase {
 
   /**
    * The name of the test database driver in use.
+   *
    * @var string
    */
   protected $testDriverName;
diff --git a/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php b/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php
index f5deb5e33e91..f81f5ab6a563 100644
--- a/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php
+++ b/core/tests/Drupal/KernelTests/Core/DrupalKernel/DrupalKernelTest.php
@@ -203,6 +203,7 @@ public function testPreventChangeOfSitePath(): void {
 
   /**
    * Data provider for self::testClassLoaderAutoDetect.
+   *
    * @return array
    */
   public static function providerClassLoaderAutoDetect() {
diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
index 6d179de5c4b6..c3370af5b305 100644
--- a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
+++ b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php
@@ -238,6 +238,7 @@ public function testHasForAliasedService(): void {
 
   /**
    * Tests that Container::get() for circular dependencies works properly.
+   *
    * @covers ::get
    * @covers ::createService
    */
@@ -357,6 +358,7 @@ public function testGetForNonExistentServiceWhenUsingNull(): void {
 
   /**
    * Tests that Container::get() for NULL service works properly.
+   *
    * @covers ::get
    * @covers ::createService
    */
diff --git a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php
index 5d769d0b1943..e2fea54aeb13 100644
--- a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php
+++ b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php
@@ -74,6 +74,7 @@ public function testCRUD(): void {
    * mtime too.
    *
    * We need to delay over 1 second for mtime test.
+   *
    * @medium
    */
   public function testSecurity(): void {
diff --git a/core/tests/Drupal/Tests/Core/Cache/CacheCollectorHelper.php b/core/tests/Drupal/Tests/Core/Cache/CacheCollectorHelper.php
index edbe5107724b..0409b932626d 100644
--- a/core/tests/Drupal/Tests/Core/Cache/CacheCollectorHelper.php
+++ b/core/tests/Drupal/Tests/Core/Cache/CacheCollectorHelper.php
@@ -13,6 +13,7 @@ class CacheCollectorHelper extends CacheCollector {
 
   /**
    * Contains data to return on a cache miss.
+   *
    * @var array
    */
   protected $cacheMissData = [];
diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/CustomPageExceptionHtmlSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/CustomPageExceptionHtmlSubscriberTest.php
index 1560d4671411..b5d263a74aa2 100644
--- a/core/tests/Drupal/Tests/Core/EventSubscriber/CustomPageExceptionHtmlSubscriberTest.php
+++ b/core/tests/Drupal/Tests/Core/EventSubscriber/CustomPageExceptionHtmlSubscriberTest.php
@@ -69,6 +69,7 @@ class CustomPageExceptionHtmlSubscriberTest extends UnitTestCase {
 
   /**
    * The mocked access unaware router.
+   *
    * @var \Symfony\Component\Routing\Matcher\UrlMatcherInterface|\PHPUnit\Framework\MockObject\MockObject
    */
   protected $accessUnawareRouter;
diff --git a/core/tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php b/core/tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php
index bdf7084e78ec..8d70c1144827 100644
--- a/core/tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php
+++ b/core/tests/Drupal/Tests/Core/Lock/LockBackendAbstractTest.php
@@ -46,6 +46,7 @@ public function testWaitFalse(): void {
    * Tests the wait() method when lockMayBeAvailable() returns FALSE.
    *
    * Waiting could take 1 second so we need to extend the possible runtime.
+   *
    * @medium
    */
   public function testWaitTrue(): void {
diff --git a/core/tests/Drupal/Tests/Core/Path/PathValidatorTest.php b/core/tests/Drupal/Tests/Core/Path/PathValidatorTest.php
index 1f80c6f6cd6a..dea2b1113db4 100644
--- a/core/tests/Drupal/Tests/Core/Path/PathValidatorTest.php
+++ b/core/tests/Drupal/Tests/Core/Path/PathValidatorTest.php
@@ -28,6 +28,7 @@ class PathValidatorTest extends UnitTestCase {
 
   /**
    * The mocked access unaware router.
+   *
    * @var \Symfony\Component\Routing\Matcher\UrlMatcherInterface|\PHPUnit\Framework\MockObject\MockObject
    */
   protected $accessUnawareRouter;
diff --git a/core/tests/Drupal/Tests/Core/Plugin/Discovery/TestDerivativeDiscoveryWithObject.php b/core/tests/Drupal/Tests/Core/Plugin/Discovery/TestDerivativeDiscoveryWithObject.php
index 5142ad81adb1..bd6f9c036563 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/Discovery/TestDerivativeDiscoveryWithObject.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/Discovery/TestDerivativeDiscoveryWithObject.php
@@ -13,12 +13,6 @@ class TestDerivativeDiscoveryWithObject implements DeriverInterface {
 
   /**
    * {@inheritdoc}
-   * @param string $derivative_id
-   *   The ID for the derivative.
-   * @param array $base_plugin_definition
-   *   An associative array defining the base plugin.
-   *
-   * @return array
    */
   public function getDerivativeDefinition($derivative_id, $base_plugin_definition) {
     $definitions = $this->getDerivativeDefinitions($base_plugin_definition);
@@ -27,10 +21,6 @@ public function getDerivativeDefinition($derivative_id, $base_plugin_definition)
 
   /**
    * {@inheritdoc}
-   * @param array $base_plugin_definition
-   *   An associative array defining the base plugin.
-   *
-   * @return array
    */
   public function getDerivativeDefinitions($base_plugin_definition) {
     $plugins = [];
diff --git a/core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php b/core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php
index 70d0a96e7a30..51b3082d944f 100644
--- a/core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/StringTranslation/TranslationManagerTest.php
@@ -32,6 +32,7 @@ protected function setUp(): void {
 
   /**
    * Provides some test data for formatPlural()
+   *
    * @return array
    */
   public static function providerTestFormatPlural() {
diff --git a/core/tests/Drupal/Tests/Core/Template/AttributeTest.php b/core/tests/Drupal/Tests/Core/Template/AttributeTest.php
index 8cf07c7cffd9..8f011b46f662 100644
--- a/core/tests/Drupal/Tests/Core/Template/AttributeTest.php
+++ b/core/tests/Drupal/Tests/Core/Template/AttributeTest.php
@@ -78,6 +78,7 @@ public function testRemove(): void {
 
   /**
    * Tests setting attributes.
+   *
    * @covers ::setAttribute
    */
   public function testSetAttribute(): void {
@@ -106,6 +107,7 @@ public function testSetAttribute(): void {
 
   /**
    * Tests removing attributes.
+   *
    * @covers ::removeAttribute
    */
   public function testRemoveAttribute(): void {
@@ -145,6 +147,7 @@ public function testRemoveAttribute(): void {
 
   /**
    * Tests adding class attributes with the AttributeArray helper method.
+   *
    * @covers ::addClass
    */
   public function testAddClasses(): void {
@@ -201,6 +204,7 @@ public function testAddClasses(): void {
 
   /**
    * Tests removing class attributes with the AttributeArray helper method.
+   *
    * @covers ::removeClass
    */
   public function testRemoveClasses(): void {
@@ -232,6 +236,7 @@ public function testRemoveClasses(): void {
 
   /**
    * Tests checking for class names with the Attribute method.
+   *
    * @covers ::hasClass
    */
   public function testHasClass(): void {
@@ -247,6 +252,7 @@ public function testHasClass(): void {
 
   /**
    * Tests removing class attributes with the Attribute helper methods.
+   *
    * @covers ::removeClass
    * @covers ::addClass
    */
@@ -265,6 +271,7 @@ public function testChainAddRemoveClasses(): void {
 
   /**
    * Tests the twig calls to the Attribute.
+   *
    * @dataProvider providerTestAttributeClassHelpers
    *
    * @covers ::removeClass
diff --git a/core/tests/Drupal/Tests/Core/Test/JUnitConverterTest.php b/core/tests/Drupal/Tests/Core/Test/JUnitConverterTest.php
index 49599b0e4ae9..0366ab068ca5 100644
--- a/core/tests/Drupal/Tests/Core/Test/JUnitConverterTest.php
+++ b/core/tests/Drupal/Tests/Core/Test/JUnitConverterTest.php
@@ -25,6 +25,7 @@ class JUnitConverterTest extends UnitTestCase {
 
   /**
    * Tests errors reported.
+   *
    * @covers ::xmlToRows
    */
   public function testXmlToRowsWithErrors(): void {
-- 
GitLab