From 81586a69f38478323ec253deda68ee3cb8ea4a7c Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Sun, 8 May 2016 14:34:57 -0500
Subject: [PATCH] Issue #2721283 by alexpott: Fix
 Drupal.Commenting.FunctionComment.$InReturnType

(cherry picked from commit 55e2442d76edfdbef426a603fb4d5ede320799c9)
---
 core/lib/Drupal/Core/Field/FieldItemInterface.php           | 2 +-
 core/lib/Drupal/Core/Field/FieldItemListInterface.php       | 2 +-
 .../language/src/ContentLanguageSettingsInterface.php       | 2 +-
 core/modules/simpletest/src/WebTestBase.php                 | 2 +-
 .../views/src/Plugin/views/query/QueryPluginBase.php        | 2 +-
 core/modules/views/src/Plugin/views/query/Sql.php           | 6 +++---
 core/phpcs.xml.dist                                         | 1 -
 7 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/core/lib/Drupal/Core/Field/FieldItemInterface.php b/core/lib/Drupal/Core/Field/FieldItemInterface.php
index 14cf9e927201..a257dd0f7c23 100644
--- a/core/lib/Drupal/Core/Field/FieldItemInterface.php
+++ b/core/lib/Drupal/Core/Field/FieldItemInterface.php
@@ -98,7 +98,7 @@ public function getEntity();
   /**
    * Gets the langcode of the field values held in the object.
    *
-   * @return $langcode
+   * @return string
    *   The langcode.
    */
   public function getLangcode();
diff --git a/core/lib/Drupal/Core/Field/FieldItemListInterface.php b/core/lib/Drupal/Core/Field/FieldItemListInterface.php
index e8bba024e9a8..2266c9c81b95 100644
--- a/core/lib/Drupal/Core/Field/FieldItemListInterface.php
+++ b/core/lib/Drupal/Core/Field/FieldItemListInterface.php
@@ -44,7 +44,7 @@ public function setLangcode($langcode);
   /**
    * Gets the langcode of the field values held in the object.
    *
-   * @return $langcode
+   * @return string
    *   The langcode.
    */
   public function getLangcode();
diff --git a/core/modules/language/src/ContentLanguageSettingsInterface.php b/core/modules/language/src/ContentLanguageSettingsInterface.php
index 3bb3d5d2541f..7e1211d3c44e 100644
--- a/core/modules/language/src/ContentLanguageSettingsInterface.php
+++ b/core/modules/language/src/ContentLanguageSettingsInterface.php
@@ -39,7 +39,7 @@ public function setTargetBundle($target_bundle);
    * @param string $default_langcode
    *   The default language code.
    *
-   * @return $this;
+   * @return $this
    */
   public function setDefaultLangcode($default_langcode);
 
diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php
index 35d23243e7bf..ebf52e4b05be 100644
--- a/core/modules/simpletest/src/WebTestBase.php
+++ b/core/modules/simpletest/src/WebTestBase.php
@@ -2631,7 +2631,7 @@ protected function assertNoResponse($code, $message = '', $group = 'Browser') {
    * @param $override_server_vars
    *   An array of server variables to override.
    *
-   * @return $request
+   * @return \Symfony\Component\HttpFoundation\Request
    *   The mocked request object.
    */
   protected function prepareRequestForGenerator($clean_urls = TRUE, $override_server_vars = array()) {
diff --git a/core/modules/views/src/Plugin/views/query/QueryPluginBase.php b/core/modules/views/src/Plugin/views/query/QueryPluginBase.php
index 5dfa0a0f75ac..e8966602467e 100644
--- a/core/modules/views/src/Plugin/views/query/QueryPluginBase.php
+++ b/core/modules/views/src/Plugin/views/query/QueryPluginBase.php
@@ -160,7 +160,7 @@ public function getLimit() {
    * @param $where
    *   'where' or 'having'.
    *
-   * @return $group
+   * @return
    *   The group ID generated.
    */
   public function setWhereGroup($type = 'AND', $group = NULL, $where = 'where') {
diff --git a/core/modules/views/src/Plugin/views/query/Sql.php b/core/modules/views/src/Plugin/views/query/Sql.php
index 43b4a4494eac..321ebf5a53f5 100644
--- a/core/modules/views/src/Plugin/views/query/Sql.php
+++ b/core/modules/views/src/Plugin/views/query/Sql.php
@@ -337,7 +337,7 @@ public function addRelationship($alias, JoinPluginBase $join, $base, $link_point
    * @param $alias
    *   A specific alias to use, rather than the default alias.
    *
-   * @return $alias
+   * @return string
    *   The alias of the table; this alias can be used to access information
    *   about the table and should always be used to refer to the table when
    *   adding parts to the query. Or FALSE if the table was not able to be
@@ -376,7 +376,7 @@ public function addTable($table, $relationship = NULL, JoinPluginBase $join = NU
    * @param $alias
    *   A specific alias to use, rather than the default alias.
    *
-   * @return $alias
+   * @return string
    *   The alias of the table; this alias can be used to access information
    *   about the table and should always be used to refer to the table when
    *   adding parts to the query. Or FALSE if the table was not able to be
@@ -723,7 +723,7 @@ public function getTableInfo($table) {
    *   - aggregate: Set to TRUE to indicate that this value should be
    *     aggregated in a GROUP BY.
    *
-   * @return $name
+   * @return string
    *   The name that this field can be referred to as. Usually this is the alias.
    */
   public function addField($table, $field, $alias = '', $params = array()) {
diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist
index 9a79f0f32843..b9a2b3246431 100644
--- a/core/phpcs.xml.dist
+++ b/core/phpcs.xml.dist
@@ -45,7 +45,6 @@
   <rule ref="Drupal.Commenting.FileComment"/>
   <rule ref="Drupal.Commenting.FunctionComment">
     <exclude name="Drupal.Commenting.FunctionComment.IncorrectTypeHint"/>
-    <exclude name="Drupal.Commenting.FunctionComment.$InReturnType"/>
     <exclude name="Drupal.Commenting.FunctionComment.InvalidNoReturn"/>
     <exclude name="Drupal.Commenting.FunctionComment.InvalidReturn"/>
     <exclude name="Drupal.Commenting.FunctionComment.InvalidReturnNotVoid"/>
-- 
GitLab