From 94398eb858700af10336a30f172eedf100e67b8b Mon Sep 17 00:00:00 2001 From: Dave Long Date: Wed, 12 Apr 2023 16:30:41 +0100 Subject: [PATCH] Issue #3268838 by quietone, TR, smustgrave, xjm: Fix functions and test modules for Drupal.Commenting.DocComment.ShortSingleLine (cherry picked from commit 6629a1634d53cc5890a327da0fe4738d07f578ff) --- core/lib/Drupal/Core/Render/theme.api.php | 3 +-- .../comment_empty_title_test.module | 3 +-- .../comment/tests/modules/comment_test/comment_test.module | 3 +-- core/modules/file/tests/file_test/file_test.module | 5 +++-- core/modules/locale/locale.compare.inc | 3 +-- core/modules/locale/locale.module | 5 +++-- .../migrate_prepare_row_test.module | 3 +-- .../migrate_skip_all_rows_test.module | 3 +-- .../search_langcode_test/search_langcode_test.module | 7 ++++--- .../update_test_description.install | 2 ++ .../taxonomy_term_display_configurable_test.module | 3 +-- core/modules/user/user.module | 3 +-- core/modules/views/views.module | 6 ++---- core/modules/views_ui/admin.inc | 7 ++----- 14 files changed, 24 insertions(+), 32 deletions(-) diff --git a/core/lib/Drupal/Core/Render/theme.api.php b/core/lib/Drupal/Core/Render/theme.api.php index 8055217a9ea..2365f966878 100644 --- a/core/lib/Drupal/Core/Render/theme.api.php +++ b/core/lib/Drupal/Core/Render/theme.api.php @@ -840,8 +840,7 @@ function hook_element_plugin_alter(array &$definitions) { } /** - * Perform necessary alterations to the JavaScript before it is presented on - * the page. + * Alters JavaScript before it is presented on the page. * * @param $javascript * An array of all JavaScript being presented on the page. diff --git a/core/modules/comment/tests/modules/comment_empty_title_test/comment_empty_title_test.module b/core/modules/comment/tests/modules/comment_empty_title_test/comment_empty_title_test.module index 3fe1616e7b3..9baeb7e3f17 100644 --- a/core/modules/comment/tests/modules/comment_empty_title_test/comment_empty_title_test.module +++ b/core/modules/comment/tests/modules/comment_empty_title_test/comment_empty_title_test.module @@ -2,8 +2,7 @@ /** * @file - * Dummy module emptying comment titles to test for appropriate and accessible - * markup in edge case scenarios where comments have empty titles. + * Empties comment titles to test markup in edge case scenarios. */ /** diff --git a/core/modules/comment/tests/modules/comment_test/comment_test.module b/core/modules/comment/tests/modules/comment_test/comment_test.module index 3b5437e2acc..3dd4f427909 100644 --- a/core/modules/comment/tests/modules/comment_test/comment_test.module +++ b/core/modules/comment/tests/modules/comment_test/comment_test.module @@ -2,8 +2,7 @@ /** * @file - * Dummy module implementing comment related hooks to test API interaction with - * the Comment module. + * Implements comment-related hooks to test API interactions. */ use Drupal\comment\CommentInterface; diff --git a/core/modules/file/tests/file_test/file_test.module b/core/modules/file/tests/file_test/file_test.module index 22fc35d8992..72091260955 100644 --- a/core/modules/file/tests/file_test/file_test.module +++ b/core/modules/file/tests/file_test/file_test.module @@ -42,8 +42,9 @@ function file_test_reset() { } /** - * Get the arguments passed to invocation of a given hook since - * file_test_reset() was last called. + * Gets the arguments passed to a given hook invocation. + * + * Arguments are gathered since file_test_reset() was last called. * * @param string $op * One of the hook_file_* operations: 'load', 'validate', 'download', diff --git a/core/modules/locale/locale.compare.inc b/core/modules/locale/locale.compare.inc index d10114acaad..b07c5360c70 100644 --- a/core/modules/locale/locale.compare.inc +++ b/core/modules/locale/locale.compare.inc @@ -253,8 +253,7 @@ function locale_translation_batch_status_build($projects = [], $langcodes = []) } /** - * Helper function to construct batch operations checking remote translation - * status. + * Constructs batch operations for checking remote translation status. * * @param array $projects * Array of project names to be processed. diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module index df38a8a54e1..06313269148 100644 --- a/core/modules/locale/locale.module +++ b/core/modules/locale/locale.module @@ -1067,8 +1067,9 @@ function _locale_strip_quotes($string) { } /** - * Parses a JavaScript file, extracts strings wrapped in Drupal.t() and - * Drupal.formatPlural() and inserts them into the database. + * Parses a JavaScript file, extracts translatable strings, and saves them. + * + * Strings are extracted from both Drupal.t() and Drupal.formatPlural(). * * @param string $filepath * File name to parse. diff --git a/core/modules/migrate/tests/modules/migrate_prepare_row_test/migrate_prepare_row_test.module b/core/modules/migrate/tests/modules/migrate_prepare_row_test/migrate_prepare_row_test.module index 6b7bc8c25f0..6c14847781c 100644 --- a/core/modules/migrate/tests/modules/migrate_prepare_row_test/migrate_prepare_row_test.module +++ b/core/modules/migrate/tests/modules/migrate_prepare_row_test/migrate_prepare_row_test.module @@ -2,8 +2,7 @@ /** * @file - * Test module for testing the migration source plugin prepareRow() exception - * handling. + * Tests the migration source plugin prepareRow() exception handling. */ use Drupal\migrate\Plugin\MigrationInterface; diff --git a/core/modules/migrate/tests/modules/migrate_skip_all_rows_test/migrate_skip_all_rows_test.module b/core/modules/migrate/tests/modules/migrate_skip_all_rows_test/migrate_skip_all_rows_test.module index cd87d0ee1de..a9c91ebbefd 100644 --- a/core/modules/migrate/tests/modules/migrate_skip_all_rows_test/migrate_skip_all_rows_test.module +++ b/core/modules/migrate/tests/modules/migrate_skip_all_rows_test/migrate_skip_all_rows_test.module @@ -2,8 +2,7 @@ /** * @file - * Test module for testing the migration source plugin prepareRow() exception - * handling. + * Tests the migration source plugin prepareRow() exception. */ use Drupal\migrate\Plugin\MigrationInterface; diff --git a/core/modules/search/tests/modules/search_langcode_test/search_langcode_test.module b/core/modules/search/tests/modules/search_langcode_test/search_langcode_test.module index 38330602a5a..53015fa4324 100644 --- a/core/modules/search/tests/modules/search_langcode_test/search_langcode_test.module +++ b/core/modules/search/tests/modules/search_langcode_test/search_langcode_test.module @@ -2,9 +2,10 @@ /** * @file - * Test module setting up two tests, one for checking if the entity $langcode is - * being passed on and another one sets up the alternate verb forms for the - * stemming test. + * Tests the preprocessing of search text. + * + * Preprocessing is tested when the language code is passed to the preprocess + * hook and also when with alternate verb forms for the stemming test. */ /** diff --git a/core/modules/system/tests/modules/update_test_description/update_test_description.install b/core/modules/system/tests/modules/update_test_description/update_test_description.install index 1ed00ccad30..06ce31ad36b 100644 --- a/core/modules/system/tests/modules/update_test_description/update_test_description.install +++ b/core/modules/system/tests/modules/update_test_description/update_test_description.install @@ -11,9 +11,11 @@ function update_test_description_update_8001() { } +// @codingStandardsIgnoreStart /** * Update test with multiline description, the quick brown fox jumped over the * lazy dog. */ function update_test_description_update_8002() { } +// @codingStandardsIgnoreEnd diff --git a/core/modules/taxonomy/tests/modules/taxonomy_term_display_configurable_test/taxonomy_term_display_configurable_test.module b/core/modules/taxonomy/tests/modules/taxonomy_term_display_configurable_test/taxonomy_term_display_configurable_test.module index 6114a9c45df..3d060789484 100644 --- a/core/modules/taxonomy/tests/modules/taxonomy_term_display_configurable_test/taxonomy_term_display_configurable_test.module +++ b/core/modules/taxonomy/tests/modules/taxonomy_term_display_configurable_test/taxonomy_term_display_configurable_test.module @@ -2,8 +2,7 @@ /** * @file - * A module for testing making taxonomy_term base fields' displays - * configurable. + * Tests configurable displays for taxonomy_term base fields. */ use Drupal\Core\Entity\EntityTypeInterface; diff --git a/core/modules/user/user.module b/core/modules/user/user.module index 830bc24311c..54d29f67335 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -999,8 +999,7 @@ function user_role_revoke_permissions($rid, array $permissions = []) { } /** - * Conditionally create and send a notification email when a certain - * operation happens on the given user account. + * Creates and sends a notification email following a change to a user account. * * @param string $op * The operation being performed on the account. Possible values: diff --git a/core/modules/views/views.module b/core/modules/views/views.module index 4c5f7a89625..a8d0a2bb5ed 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -217,8 +217,7 @@ function views_theme($existing, $type, $theme, $path) { } /** - * A theme preprocess function to automatically allow view-based node - * templates if called from a view. + * Allows view-based node templates if called from a view. * * The 'modules/node.views.inc' file is a better place for this, but * we haven't got a chance to load that file before Drupal builds the @@ -254,8 +253,7 @@ function views_theme_suggestions_node_alter(array &$suggestions, array $variable } /** - * A theme preprocess function to automatically allow view-based node - * templates if called from a view. + * Allows view-based comment templates if called from a view. */ function views_preprocess_comment(&$variables) { // The view data is added to the comment in diff --git a/core/modules/views_ui/admin.inc b/core/modules/views_ui/admin.inc index 230dd773ae1..92f2d7d91d7 100644 --- a/core/modules/views_ui/admin.inc +++ b/core/modules/views_ui/admin.inc @@ -200,9 +200,7 @@ function views_ui_nojs_submit($form, FormStateInterface $form_state) { } /** - * Add a