From 4aceac1795ee5e86e6ee3c31c41940b4c3b1681f Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Thu, 5 May 2016 12:33:36 +0100 Subject: [PATCH] Issue #2715965 by alexpott: Fix 'Drupal.Commenting.FunctionComment.IncorrectParamVarName' coding standard (cherry picked from commit 524dc283d50c10b1b1bb664b526e2c23a32a73f9) --- core/lib/Drupal/Component/Gettext/PoItem.php | 2 +- core/lib/Drupal/Core/Ajax/DataCommand.php | 2 +- .../src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php | 2 +- core/modules/system/src/Tests/Routing/MockAliasManager.php | 6 +++--- .../views/src/Plugin/views/query/QueryPluginBase.php | 2 +- core/modules/views_ui/src/Tests/ArgumentValidatorTest.php | 2 +- core/phpcs.xml.dist | 1 - 7 files changed, 8 insertions(+), 9 deletions(-) diff --git a/core/lib/Drupal/Component/Gettext/PoItem.php b/core/lib/Drupal/Component/Gettext/PoItem.php index 3ef42cef4a8f..c5579641c58a 100644 --- a/core/lib/Drupal/Component/Gettext/PoItem.php +++ b/core/lib/Drupal/Component/Gettext/PoItem.php @@ -160,7 +160,7 @@ function getComment() { /** * Set the comment of this translation. * - * @param String $comment + * @param string $comment */ function setComment($comment) { $this->_comment = $comment; diff --git a/core/lib/Drupal/Core/Ajax/DataCommand.php b/core/lib/Drupal/Core/Ajax/DataCommand.php index fe838caced7d..92b87bde8d84 100644 --- a/core/lib/Drupal/Core/Ajax/DataCommand.php +++ b/core/lib/Drupal/Core/Ajax/DataCommand.php @@ -48,7 +48,7 @@ class DataCommand implements CommandInterface { * A CSS selector for the elements to which the data will be attached. * @param string $name * The key of the data to be attached to elements matched by the selector. - * @param type $value + * @param mixed $value * The value of the data to be attached to elements matched by the selector. */ public function __construct($selector, $name, $value) { diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php index 76a8b0f89cad..83279d033801 100644 --- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php +++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php @@ -76,7 +76,7 @@ protected function createType($id) { * The expected field label. * @param string $expected_field_type * The expected field type. - * @param boolean $is_required + * @param bool $is_required * Whether or not the field is required. */ protected function assertEntity($id, $expected_label, $expected_field_type, $is_required) { diff --git a/core/modules/system/src/Tests/Routing/MockAliasManager.php b/core/modules/system/src/Tests/Routing/MockAliasManager.php index f2c9a0b02f48..ff487858cf1f 100644 --- a/core/modules/system/src/Tests/Routing/MockAliasManager.php +++ b/core/modules/system/src/Tests/Routing/MockAliasManager.php @@ -40,11 +40,11 @@ class MockAliasManager implements AliasManagerInterface { /** * Adds an alias to the in-memory alias table for this object. * - * @param type $path + * @param string $path * The system path of the alias. - * @param type $alias + * @param string $alias * The alias of the system path. - * @param type $path_language + * @param string $path_language * The language of this alias. */ public function addAlias($path, $alias, $path_language = NULL) { diff --git a/core/modules/views/src/Plugin/views/query/QueryPluginBase.php b/core/modules/views/src/Plugin/views/query/QueryPluginBase.php index d41731e8ca7c..5dfa0a0f75ac 100644 --- a/core/modules/views/src/Plugin/views/query/QueryPluginBase.php +++ b/core/modules/views/src/Plugin/views/query/QueryPluginBase.php @@ -231,7 +231,7 @@ public function setupTimezone() { * An appropriate query expression pointing to the date field. * @param string $format * A format string for the result, like 'Y-m-d H:i:s'. - * @param boolean $string_date + * @param bool $string_date * For certain databases, date format functions vary depending on string or * numeric storage. * diff --git a/core/modules/views_ui/src/Tests/ArgumentValidatorTest.php b/core/modules/views_ui/src/Tests/ArgumentValidatorTest.php index 449a25c5d79d..c3035530366c 100644 --- a/core/modules/views_ui/src/Tests/ArgumentValidatorTest.php +++ b/core/modules/views_ui/src/Tests/ArgumentValidatorTest.php @@ -43,7 +43,7 @@ public function testSpecifyValidation() { * Saves the test_argument view with changes made to the argument handler * both with and without specify_validation turned on. * - * @param boolean $specify_validation + * @param bool $specify_validation */ protected function saveArgumentHandlerWithValidationOptions($specify_validation) { $options = array( diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist index 09a6a315352e..d2197e72ad12 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -40,7 +40,6 @@ <rule ref="Drupal.Commenting.DocCommentStar"/> <rule ref="Drupal.Commenting.FileComment"/> <rule ref="Drupal.Commenting.FunctionComment"> - <exclude name="Drupal.Commenting.FunctionComment.IncorrectParamVarName"/> <exclude name="Drupal.Commenting.FunctionComment.IncorrectTypeHint"/> <exclude name="Drupal.Commenting.FunctionComment.$InReturnType"/> <exclude name="Drupal.Commenting.FunctionComment.InvalidNoReturn"/> -- GitLab