From 98c68fdbfda59dacdfc31ec6a32409f620adf38d Mon Sep 17 00:00:00 2001
From: Nathaniel Catchpole <catch@35733.no-reply.drupal.org>
Date: Tue, 22 Aug 2017 16:16:08 +0900
Subject: [PATCH] Issue #2803891 by Jo Fitzgerald, pfrenssen, mfernea,
 gaurav.kapoor: Fix 'Drupal.Commenting.FunctionComment.ReturnTypeSpaces'
 coding standard

---
 core/includes/install.inc                                  | 7 ++++---
 core/lib/Drupal/Core/Command/DbDumpCommand.php             | 4 ++--
 .../hal/src/LinkManager/TypeLinkManagerInterface.php       | 2 +-
 core/modules/user/src/Tests/RestRegisterUserTest.php       | 2 +-
 .../user/tests/src/Functional/UserLoginHttpTest.php        | 4 ++--
 .../tests/src/Unit/EventSubscriber/RouteSubscriberTest.php | 4 ++--
 core/phpcs.xml.dist                                        | 1 -
 7 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/core/includes/install.inc b/core/includes/install.inc
index c5b93b58a652..5c0abcab8ea0 100644
--- a/core/includes/install.inc
+++ b/core/includes/install.inc
@@ -114,9 +114,10 @@ function drupal_install_profile_distribution_name() {
 /**
  * Loads the installation profile, extracting its defined version.
  *
- * @return string Distribution version defined in the profile's .info.yml file.
- *   Defaults to \Drupal::VERSION if no version is explicitly provided
- *   by the installation profile.
+ * @return string
+ *   Distribution version defined in the profile's .info.yml file.
+ *   Defaults to \Drupal::VERSION if no version is explicitly provided by the
+ *   installation profile.
  *
  * @see install_profile_info()
  */
diff --git a/core/lib/Drupal/Core/Command/DbDumpCommand.php b/core/lib/Drupal/Core/Command/DbDumpCommand.php
index 264bd3f2a1e3..aa81af041f1a 100644
--- a/core/lib/Drupal/Core/Command/DbDumpCommand.php
+++ b/core/lib/Drupal/Core/Command/DbDumpCommand.php
@@ -69,7 +69,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
    *   The database connection to use.
    * @param array $schema_only
    *   Table patterns for which to only dump the schema, no data.
-   * @return string The PHP script.
+   * @return string
    *   The PHP script.
    */
   protected function generateScript(Connection $connection, array $schema_only = []) {
@@ -102,7 +102,7 @@ protected function generateScript(Connection $connection, array $schema_only = [
    *
    * @param \Drupal\Core\Database\Connection $connection
    *   The database connection to use.
-   * @return array An array of table names.
+   * @return array
    *   An array of table names.
    */
   protected function getTables(Connection $connection) {
diff --git a/core/modules/hal/src/LinkManager/TypeLinkManagerInterface.php b/core/modules/hal/src/LinkManager/TypeLinkManagerInterface.php
index c3dabe419ab9..708b9ab13e4f 100644
--- a/core/modules/hal/src/LinkManager/TypeLinkManagerInterface.php
+++ b/core/modules/hal/src/LinkManager/TypeLinkManagerInterface.php
@@ -31,7 +31,7 @@ public function getTypeUri($entity_type, $bundle, $context = []);
    * @param array $context
    *   Context from the normalizer/serializer operation.
    *
-   * @return array | boolean
+   * @return array|bool
    *   If the URI matches a bundle, returns an array containing entity_type and
    *   bundle. Otherwise, returns false.
    */
diff --git a/core/modules/user/src/Tests/RestRegisterUserTest.php b/core/modules/user/src/Tests/RestRegisterUserTest.php
index 62e6bbc687ee..450c5529195f 100644
--- a/core/modules/user/src/Tests/RestRegisterUserTest.php
+++ b/core/modules/user/src/Tests/RestRegisterUserTest.php
@@ -117,7 +117,7 @@ public function testRegisterUser() {
    * @param bool $include_password
    *   Whether to include a password in the user values.
    *
-   * @return string Serialized user values.
+   * @return string
    *   Serialized user values.
    */
   protected function createSerializedUser($name, $include_password = TRUE) {
diff --git a/core/modules/user/tests/src/Functional/UserLoginHttpTest.php b/core/modules/user/tests/src/Functional/UserLoginHttpTest.php
index 09dfebcecb0f..d01ad62eceee 100644
--- a/core/modules/user/tests/src/Functional/UserLoginHttpTest.php
+++ b/core/modules/user/tests/src/Functional/UserLoginHttpTest.php
@@ -64,7 +64,7 @@ protected function setUp() {
    * @param string $format
    *   The format to use to make the request.
    *
-   * @return \Psr\Http\Message\ResponseInterface The HTTP response.
+   * @return \Psr\Http\Message\ResponseInterface
    *   The HTTP response.
    */
   protected function loginRequest($name, $pass, $format = 'json') {
@@ -395,7 +395,7 @@ public function testPerUserLoginFloodControl() {
    * @param string $logout_token
    *   The csrf token for user logout.
    *
-   * @return \Psr\Http\Message\ResponseInterface The HTTP response.
+   * @return \Psr\Http\Message\ResponseInterface
    *   The HTTP response.
    */
   protected function logoutRequest($format = 'json', $logout_token = '') {
diff --git a/core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php b/core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php
index c89554a77cd7..76f0cd8683d3 100644
--- a/core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php
+++ b/core/modules/views/tests/src/Unit/EventSubscriber/RouteSubscriberTest.php
@@ -139,8 +139,8 @@ public function testOnAlterRoutes() {
   /**
    * Sets up mocks of Views objects needed for testing.
    *
-   * @return array \Drupal\views\Plugin\views\display\DisplayRouterInterface[]|\PHPUnit_Framework_MockObject_MockObject[]
-   *   An array of two mocked view displays
+   * @return \Drupal\views\Plugin\views\display\DisplayRouterInterface[]|\PHPUnit_Framework_MockObject_MockObject[]
+   *   An array of two mocked view displays.
    */
   protected function setupMocks() {
     $executable = $this->getMockBuilder('Drupal\views\ViewExecutable')
diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist
index 5b41b69a8a53..67e47e1c1dd5 100644
--- a/core/phpcs.xml.dist
+++ b/core/phpcs.xml.dist
@@ -60,7 +60,6 @@
     <exclude name="Drupal.Commenting.FunctionComment.ParamMissingDefinition"/>
     <exclude name="Drupal.Commenting.FunctionComment.ParamNameNoMatch"/>
     <exclude name="Drupal.Commenting.FunctionComment.ParamTypeSpaces"/>
-    <exclude name="Drupal.Commenting.FunctionComment.ReturnTypeSpaces"/>
     <exclude name="Drupal.Commenting.FunctionComment.TypeHintMissing"/>
   </rule>
   <rule ref="../vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/ControlStructures/ElseIfSniff.php"/>
-- 
GitLab