From a0bb5da1bca102d56a9458cb7c43eece59f39fe1 Mon Sep 17 00:00:00 2001 From: Nathaniel Catchpole <catch@35733.no-reply.drupal.org> Date: Mon, 21 Aug 2017 13:40:56 +0900 Subject: [PATCH] Issue #2901665 by mfernea: Fix 'Drupal.Commenting.FunctionComment.ParamCommentNewLine' coding standard --- core/lib/Drupal/Component/Diff/Diff.php | 8 +++++--- core/lib/Drupal/Component/Diff/MappedDiff.php | 19 ++++++++++--------- .../system/src/Tests/Session/SessionTest.php | 3 ++- core/phpcs.xml.dist | 1 - 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/core/lib/Drupal/Component/Diff/Diff.php b/core/lib/Drupal/Component/Diff/Diff.php index c70c417a8c48..8135b1582563 100644 --- a/core/lib/Drupal/Component/Diff/Diff.php +++ b/core/lib/Drupal/Component/Diff/Diff.php @@ -27,9 +27,11 @@ class Diff { * Constructor. * Computes diff between sequences of strings. * - * @param $from_lines array An array of strings. - * (Typically these are lines from a file.) - * @param $to_lines array An array of strings. + * @param array $from_lines + * An array of strings. + * (Typically these are lines from a file.) + * @param array $to_lines + * An array of strings. */ public function __construct($from_lines, $to_lines) { $eng = new DiffEngine(); diff --git a/core/lib/Drupal/Component/Diff/MappedDiff.php b/core/lib/Drupal/Component/Diff/MappedDiff.php index d49cc0df6227..32b38995d762 100644 --- a/core/lib/Drupal/Component/Diff/MappedDiff.php +++ b/core/lib/Drupal/Component/Diff/MappedDiff.php @@ -19,16 +19,17 @@ class MappedDiff extends Diff { * case-insensitive diffs, or diffs which ignore * changes in white-space. * - * @param $from_lines array An array of strings. + * @param array $from_lines + * An array of strings. * (Typically these are lines from a file.) - * @param $to_lines array An array of strings. - * @param $mapped_from_lines array This array should - * have the same size number of elements as $from_lines. - * The elements in $mapped_from_lines and - * $mapped_to_lines are what is actually compared - * when computing the diff. - * @param $mapped_to_lines array This array should - * have the same number of elements as $to_lines. + * @param array $to_lines + * An array of strings. + * @param array $mapped_from_lines + * This array should have the same size number of elements as $from_lines. + * The elements in $mapped_from_lines and $mapped_to_lines are what is + * actually compared when computing the diff. + * @param array $mapped_to_lines + * This array should have the same number of elements as $to_lines. */ public function __construct($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) { diff --git a/core/modules/system/src/Tests/Session/SessionTest.php b/core/modules/system/src/Tests/Session/SessionTest.php index fcadd42b91ea..1be9561b36f7 100644 --- a/core/modules/system/src/Tests/Session/SessionTest.php +++ b/core/modules/system/src/Tests/Session/SessionTest.php @@ -282,7 +282,8 @@ public function testEmptySessionID() { /** * Reset the cookie file so that it refers to the specified user. * - * @param $uid User id to set as the active session. + * @param $uid + * User id to set as the active session. */ public function sessionReset($uid = 0) { // Close the internal browser. diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist index 3ec3e1df1dee..45dbe153e58b 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -56,7 +56,6 @@ <exclude name="Drupal.Commenting.FunctionComment.MissingReturnType"/> <exclude name="Drupal.Commenting.FunctionComment.ParamCommentFullStop"/> <exclude name="Drupal.Commenting.FunctionComment.ParamCommentIndentation"/> - <exclude name="Drupal.Commenting.FunctionComment.ParamCommentNewLine"/> <exclude name="Drupal.Commenting.FunctionComment.ParamCommentNotCapital"/> <exclude name="Drupal.Commenting.FunctionComment.ParamMissingDefinition"/> <exclude name="Drupal.Commenting.FunctionComment.ParamNameNoMatch"/> -- GitLab