From b85856f417456f6b47debeadc7f721b006996122 Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Thu, 12 Oct 2017 11:31:03 +0100
Subject: [PATCH] Issue #2909368 by mfernea, reflie, zaporylie: Fix
 'Drupal.Commenting.VariableComment.InlineVariableName' coding standard

---
 core/lib/Drupal/Component/FileCache/FileCacheFactory.php      | 2 +-
 core/lib/Drupal/Core/Asset/AssetResolver.php                  | 2 +-
 .../Core/EventSubscriber/MenuRouterRebuildSubscriber.php      | 2 +-
 core/lib/Drupal/Core/Queue/DatabaseQueue.php                  | 2 +-
 core/lib/Drupal/Core/Queue/QueueDatabaseFactory.php           | 2 +-
 core/lib/Drupal/Core/Routing/RouteBuilder.php                 | 2 +-
 .../tests/src/Unit/ConfigEntityMapperTest.php                 | 2 +-
 .../tests/src/Unit/ConfigNamesMapperTest.php                  | 2 +-
 core/modules/content_moderation/src/ContentPreprocess.php     | 2 +-
 .../menu_link_content/tests/src/Functional/LinksTest.php      | 2 +-
 .../migrate/tests/src/Unit/MigrationPluginManagerTest.php     | 2 +-
 core/modules/path/src/Form/DeleteForm.php                     | 4 ++--
 core/modules/path/src/Plugin/migrate/destination/UrlAlias.php | 2 +-
 core/modules/system/src/Form/CronForm.php                     | 2 +-
 .../system/tests/src/Kernel/Block/SystemMenuBlockTest.php     | 2 +-
 core/modules/user/src/PrivateTempStoreFactory.php             | 2 +-
 core/modules/user/src/SharedTempStoreFactory.php              | 2 +-
 core/phpcs.xml.dist                                           | 3 +--
 .../Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php    | 2 +-
 core/tests/Drupal/KernelTests/Core/Menu/MenuLinkTreeTest.php  | 2 +-
 20 files changed, 21 insertions(+), 22 deletions(-)

diff --git a/core/lib/Drupal/Component/FileCache/FileCacheFactory.php b/core/lib/Drupal/Component/FileCache/FileCacheFactory.php
index 15b202606d37..ca68757bc8a5 100644
--- a/core/lib/Drupal/Component/FileCache/FileCacheFactory.php
+++ b/core/lib/Drupal/Component/FileCache/FileCacheFactory.php
@@ -15,7 +15,7 @@ class FileCacheFactory {
   /**
    * The configuration used to create FileCache objects.
    *
-   * @var array $configuration
+   * @var array
    */
   protected static $configuration;
 
diff --git a/core/lib/Drupal/Core/Asset/AssetResolver.php b/core/lib/Drupal/Core/Asset/AssetResolver.php
index 863f971838ae..d90506e4a060 100644
--- a/core/lib/Drupal/Core/Asset/AssetResolver.php
+++ b/core/lib/Drupal/Core/Asset/AssetResolver.php
@@ -45,7 +45,7 @@ class AssetResolver implements AssetResolverInterface {
   /**
    * The language manager.
    *
-   * @var \Drupal\Core\Language\LanguageManagerInterface $language_manager
+   * @var \Drupal\Core\Language\LanguageManagerInterface
    */
   protected $languageManager;
 
diff --git a/core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php
index 521c58206b44..8917cf218b73 100644
--- a/core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php
@@ -22,7 +22,7 @@ class MenuRouterRebuildSubscriber implements EventSubscriberInterface {
   /**
    * The menu link plugin manager.
    *
-   * @var \Drupal\Core\Menu\MenuLinkManagerInterface $menuLinkManager
+   * @var \Drupal\Core\Menu\MenuLinkManagerInterface
    */
   protected $menuLinkManager;
 
diff --git a/core/lib/Drupal/Core/Queue/DatabaseQueue.php b/core/lib/Drupal/Core/Queue/DatabaseQueue.php
index d0d1fb9415c7..0e91029460f0 100644
--- a/core/lib/Drupal/Core/Queue/DatabaseQueue.php
+++ b/core/lib/Drupal/Core/Queue/DatabaseQueue.php
@@ -30,7 +30,7 @@ class DatabaseQueue implements ReliableQueueInterface, QueueGarbageCollectionInt
   /**
    * The database connection.
    *
-   * @var \Drupal\Core\Database\Connection $connection
+   * @var \Drupal\Core\Database\Connection
    */
   protected $connection;
 
diff --git a/core/lib/Drupal/Core/Queue/QueueDatabaseFactory.php b/core/lib/Drupal/Core/Queue/QueueDatabaseFactory.php
index a64678952e4f..c4e5b3ba1337 100644
--- a/core/lib/Drupal/Core/Queue/QueueDatabaseFactory.php
+++ b/core/lib/Drupal/Core/Queue/QueueDatabaseFactory.php
@@ -12,7 +12,7 @@ class QueueDatabaseFactory {
   /**
    * The database connection.
    *
-   * @var \Drupal\Core\Database\Connection $connection
+   * @var \Drupal\Core\Database\Connection
    */
   protected $connection;
 
diff --git a/core/lib/Drupal/Core/Routing/RouteBuilder.php b/core/lib/Drupal/Core/Routing/RouteBuilder.php
index 2a0720a2d464..c4175ed7c80e 100644
--- a/core/lib/Drupal/Core/Routing/RouteBuilder.php
+++ b/core/lib/Drupal/Core/Routing/RouteBuilder.php
@@ -28,7 +28,7 @@ class RouteBuilder implements RouteBuilderInterface, DestructableInterface {
   /**
    * The used lock backend instance.
    *
-   * @var \Drupal\Core\Lock\LockBackendInterface $lock
+   * @var \Drupal\Core\Lock\LockBackendInterface
    */
   protected $lock;
 
diff --git a/core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php b/core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php
index 11e72c2dff3d..db316caf57f4 100644
--- a/core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php
+++ b/core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php
@@ -45,7 +45,7 @@ class ConfigEntityMapperTest extends UnitTestCase {
   /**
    * The mocked language manager.
    *
-   * @var \Drupal\Core\Language\LanguageManagerInterface $language_manager|\PHPUnit_Framework_MockObject_MockObject
+   * @var \Drupal\Core\Language\LanguageManagerInterface|\PHPUnit_Framework_MockObject_MockObject
    */
   protected $languageManager;
 
diff --git a/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php b/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php
index e7a06794f8f8..b099c7fa2138 100644
--- a/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php
+++ b/core/modules/config_translation/tests/src/Unit/ConfigNamesMapperTest.php
@@ -84,7 +84,7 @@ class ConfigNamesMapperTest extends UnitTestCase {
   /**
    * The mocked language manager.
    *
-   * @var \Drupal\Core\Language\LanguageManagerInterface $language_manager|\PHPUnit_Framework_MockObject_MockObject
+   * @var \Drupal\Core\Language\LanguageManagerInterface|\PHPUnit_Framework_MockObject_MockObject
    */
   protected $languageManager;
 
diff --git a/core/modules/content_moderation/src/ContentPreprocess.php b/core/modules/content_moderation/src/ContentPreprocess.php
index b8887ef7b939..853a787ed836 100644
--- a/core/modules/content_moderation/src/ContentPreprocess.php
+++ b/core/modules/content_moderation/src/ContentPreprocess.php
@@ -17,7 +17,7 @@ class ContentPreprocess implements ContainerInjectionInterface {
   /**
    * The route match service.
    *
-   * @var \Drupal\Core\Routing\RouteMatchInterface $routeMatch
+   * @var \Drupal\Core\Routing\RouteMatchInterface
    */
   protected $routeMatch;
 
diff --git a/core/modules/menu_link_content/tests/src/Functional/LinksTest.php b/core/modules/menu_link_content/tests/src/Functional/LinksTest.php
index 0fbe4a4be72d..6a3d50b319f4 100644
--- a/core/modules/menu_link_content/tests/src/Functional/LinksTest.php
+++ b/core/modules/menu_link_content/tests/src/Functional/LinksTest.php
@@ -26,7 +26,7 @@ class LinksTest extends BrowserTestBase {
   /**
    * The menu link plugin manager.
    *
-   * @var \Drupal\Core\Menu\MenuLinkManagerInterface $menuLinkManager
+   * @var \Drupal\Core\Menu\MenuLinkManagerInterface
    */
   protected $menuLinkManager;
 
diff --git a/core/modules/migrate/tests/src/Unit/MigrationPluginManagerTest.php b/core/modules/migrate/tests/src/Unit/MigrationPluginManagerTest.php
index 91351cfc171f..9dbe850148d2 100644
--- a/core/modules/migrate/tests/src/Unit/MigrationPluginManagerTest.php
+++ b/core/modules/migrate/tests/src/Unit/MigrationPluginManagerTest.php
@@ -183,7 +183,7 @@ class TestMigrationMock extends Migration {
   /**
    * The values passed into set().
    *
-   * @var array $set
+   * @var array
    */
   public $set = [];
 
diff --git a/core/modules/path/src/Form/DeleteForm.php b/core/modules/path/src/Form/DeleteForm.php
index b28fdc04eda8..ae9257a7e7dd 100644
--- a/core/modules/path/src/Form/DeleteForm.php
+++ b/core/modules/path/src/Form/DeleteForm.php
@@ -16,14 +16,14 @@ class DeleteForm extends ConfirmFormBase {
   /**
    * The alias storage service.
    *
-   * @var AliasStorageInterface $path
+   * @var AliasStorageInterface
    */
   protected $aliasStorage;
 
   /**
    * The path alias being deleted.
    *
-   * @var array $pathAlias
+   * @var array
    */
   protected $pathAlias;
 
diff --git a/core/modules/path/src/Plugin/migrate/destination/UrlAlias.php b/core/modules/path/src/Plugin/migrate/destination/UrlAlias.php
index 385ee4ba4652..a845fb3908ed 100644
--- a/core/modules/path/src/Plugin/migrate/destination/UrlAlias.php
+++ b/core/modules/path/src/Plugin/migrate/destination/UrlAlias.php
@@ -19,7 +19,7 @@ class UrlAlias extends DestinationBase implements ContainerFactoryPluginInterfac
   /**
    * The alias storage service.
    *
-   * @var \Drupal\Core\Path\AliasStorage $aliasStorage
+   * @var \Drupal\Core\Path\AliasStorage
    */
   protected $aliasStorage;
 
diff --git a/core/modules/system/src/Form/CronForm.php b/core/modules/system/src/Form/CronForm.php
index 8a3f23175cdb..3957060e109a 100644
--- a/core/modules/system/src/Form/CronForm.php
+++ b/core/modules/system/src/Form/CronForm.php
@@ -43,7 +43,7 @@ class CronForm extends FormBase {
   /**
    * The module handler service.
    *
-   * @var \Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler
+   * @var \Drupal\Core\Extension\ModuleHandlerInterface
    */
   protected $moduleHandler;
 
diff --git a/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php b/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php
index 07cf684b11a3..663bff6bae76 100644
--- a/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php
+++ b/core/modules/system/tests/src/Kernel/Block/SystemMenuBlockTest.php
@@ -65,7 +65,7 @@ class SystemMenuBlockTest extends KernelTestBase {
   /**
    * The menu link plugin manager service.
    *
-   * @var \Drupal\Core\Menu\MenuLinkManagerInterface $menuLinkManager
+   * @var \Drupal\Core\Menu\MenuLinkManagerInterface
    */
   protected $menuLinkManager;
 
diff --git a/core/modules/user/src/PrivateTempStoreFactory.php b/core/modules/user/src/PrivateTempStoreFactory.php
index 063a9207cf36..e51faf342daa 100644
--- a/core/modules/user/src/PrivateTempStoreFactory.php
+++ b/core/modules/user/src/PrivateTempStoreFactory.php
@@ -22,7 +22,7 @@ class PrivateTempStoreFactory {
   /**
    * The lock object used for this data.
    *
-   * @var \Drupal\Core\Lock\LockBackendInterface $lockBackend
+   * @var \Drupal\Core\Lock\LockBackendInterface
    */
   protected $lockBackend;
 
diff --git a/core/modules/user/src/SharedTempStoreFactory.php b/core/modules/user/src/SharedTempStoreFactory.php
index c1c48a93b5b0..29f868320198 100644
--- a/core/modules/user/src/SharedTempStoreFactory.php
+++ b/core/modules/user/src/SharedTempStoreFactory.php
@@ -21,7 +21,7 @@ class SharedTempStoreFactory {
   /**
    * The lock object used for this data.
    *
-   * @var \Drupal\Core\Lock\LockBackendInterface $lockBackend
+   * @var \Drupal\Core\Lock\LockBackendInterface
    */
   protected $lockBackend;
 
diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist
index 66a59f4a4024..ff44773365da 100644
--- a/core/phpcs.xml.dist
+++ b/core/phpcs.xml.dist
@@ -64,8 +64,7 @@
     <exclude name="Drupal.Commenting.FunctionComment.TypeHintMissing"/>
   </rule>
   <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Commenting/VariableCommentSniff.php">
-    <!-- Sniff for: DuplicateVar -->
-    <exclude name="Drupal.Commenting.VariableComment.InlineVariableName"/>
+    <!-- Sniff for: DuplicateVar, InlineVariableName -->
     <exclude name="Drupal.Commenting.VariableComment.EmptyVar"/>
     <exclude name="Drupal.Commenting.VariableComment.IncorrectVarType"/>
     <exclude name="Drupal.Commenting.VariableComment.MissingVar"/>
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php b/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php
index 884ee89956b7..7ff6caf2b121 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php
@@ -68,7 +68,7 @@ class FieldSqlStorageTest extends EntityKernelTestBase {
   /**
    * The table mapping for the tested entity type.
    *
-   * @var \Drupal\Core\Entity\Sql\DefaultTableMapping $table_mapping
+   * @var \Drupal\Core\Entity\Sql\DefaultTableMapping
    */
   protected $tableMapping;
 
diff --git a/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkTreeTest.php b/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkTreeTest.php
index cd0afa2d039d..9bb7f5455d2c 100644
--- a/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkTreeTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Menu/MenuLinkTreeTest.php
@@ -26,7 +26,7 @@ class MenuLinkTreeTest extends KernelTestBase {
   /**
    * The menu link plugin manager.
    *
-   * @var \Drupal\Core\Menu\MenuLinkManagerInterface $menuLinkManager
+   * @var \Drupal\Core\Menu\MenuLinkManagerInterface
    */
   protected $menuLinkManager;
 
-- 
GitLab