From 6629a1634d53cc5890a327da0fe4738d07f578ff Mon Sep 17 00:00:00 2001 From: Dave Long <dave@longwaveconsulting.com> 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 --- 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 cb960152278a..cd33aecbc29b 100644 --- a/core/lib/Drupal/Core/Render/theme.api.php +++ b/core/lib/Drupal/Core/Render/theme.api.php @@ -857,8 +857,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 3fe1616e7b35..9baeb7e3f17c 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 3b5437e2acc1..3dd4f427909a 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 22fc35d8992f..720912609552 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 d10114acaad1..b07c5360c70b 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 c06ea62bb237..ab64ccf4c801 100644 --- a/core/modules/locale/locale.module +++ b/core/modules/locale/locale.module @@ -1071,8 +1071,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 6b7bc8c25f02..6c14847781c1 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 cd87d0ee1de7..a9c91ebbefd0 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 38330602a5a6..53015fa43241 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 1ed00ccad30b..06ce31ad36b6 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 6114a9c45df9..3d0607894848 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 4109a3b8f993..fc5484150e1b 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -1012,8 +1012,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 0c781090b896..17698310447f 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -219,8 +219,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 @@ -256,8 +255,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 230dd773ae19..92f2d7d91d7a 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 <select> dropdown for a given section, allowing the user to - * change whether this info is stored on the default display or on - * the current display. + * Adds an element to select either the default display or the current display. */ function views_ui_standard_display_dropdown(&$form, FormStateInterface $form_state, $section) { $view = $form_state->get('view'); @@ -269,8 +267,7 @@ function views_ui_standard_display_dropdown(&$form, FormStateInterface $form_sta } /** - * Create the menu path for one of our standard AJAX forms based upon known - * information about the form. + * Creates the menu path for a standard AJAX form given the form state. * * @return \Drupal\Core\Url * The URL object pointing to the form URL. -- GitLab