From 9dd964d013f770a93914124548559747d1c9e016 Mon Sep 17 00:00:00 2001 From: Lisa Ridley Date: Tue, 10 Sep 2024 08:18:03 -0400 Subject: [PATCH] UTC-32: Resolving lingering coding standards issues surfacing with Github Actions workflow testing for Drupal Coding Standards compliance. --- .../particle_theme/includes/admin.theme.inc | 3 +++ .../particle_theme/includes/aggregator.theme.inc | 7 ++++--- .../particle_theme/includes/form.theme.inc | 3 +++ .../particle_theme/includes/misc.theme.inc | 2 +- .../particle_theme/includes/page_attachments.inc | 9 +++------ .../particle_theme/includes/theme_variables.inc | 1 + 6 files changed, 15 insertions(+), 10 deletions(-) diff --git a/apps/drupal-default/particle_theme/includes/admin.theme.inc b/apps/drupal-default/particle_theme/includes/admin.theme.inc index 1cd65617e9..c1acd72b8f 100644 --- a/apps/drupal-default/particle_theme/includes/admin.theme.inc +++ b/apps/drupal-default/particle_theme/includes/admin.theme.inc @@ -5,6 +5,9 @@ * Functions to support theming admin in the Particle theme. */ +/** + * Implements hook_preprocess_input(). + */ function particle_preprocess_input(&$variables) { $variables['variant'] = (string) $variables['attributes']['type']; } diff --git a/apps/drupal-default/particle_theme/includes/aggregator.theme.inc b/apps/drupal-default/particle_theme/includes/aggregator.theme.inc index 3a94a2ade8..8578a69728 100644 --- a/apps/drupal-default/particle_theme/includes/aggregator.theme.inc +++ b/apps/drupal-default/particle_theme/includes/aggregator.theme.inc @@ -2,6 +2,7 @@ /** * @file + * Hooks related to Aggregator funtionality. */ use Drupal\node\NodeInterface; @@ -12,7 +13,7 @@ use Drupal\Component\Utility\Html; */ function particle_preprocess_aggregator_item(&$variables, $hook) { // Don't go looking for a manage display tab, there is none as - // aggregator_items are not being exposed to the field UI + // aggregator_items are not being exposed to the field UI. $timeStamp = $variables['elements']['#aggregator_item']->get('timestamp')->value; $variables['feed'] = $variables['elements']['#aggregator_item']->get('fid')->entity->title->value; $variables['adapted_time'] = date('M-d', $timeStamp); @@ -22,8 +23,8 @@ function particle_preprocess_aggregator_item(&$variables, $hook) { * Implements template_preprocess_hook(). */ function particle_preprocess_aggregator_feed(&$variables) { - // sorts based on the key of its elements - // $AggregatorArray = $variables['content']['items']; + // Sorts based on the key of its elements + // $AggregatorArray = $variables['content']['items'];. if ($variables['elements']['#view_mode'] === "utc_summary") { ksort($variables['content']['items']); } diff --git a/apps/drupal-default/particle_theme/includes/form.theme.inc b/apps/drupal-default/particle_theme/includes/form.theme.inc index 67edde66f1..4fbd945c63 100644 --- a/apps/drupal-default/particle_theme/includes/form.theme.inc +++ b/apps/drupal-default/particle_theme/includes/form.theme.inc @@ -9,6 +9,9 @@ declare(strict_types = 1); use Drupal\Core\Form\FormStateInterface; +/** + * Implements hook_form_layout_builder_add_block_alter(). + */ function particle_form_layout_builder_add_block_alter(array &$form, FormStateInterface $form_state): void { // Make the block title a hidden element and generate a UUID for the block // title if one is not already provided. diff --git a/apps/drupal-default/particle_theme/includes/misc.theme.inc b/apps/drupal-default/particle_theme/includes/misc.theme.inc index 4d69dd97d9..7be4fb44b0 100644 --- a/apps/drupal-default/particle_theme/includes/misc.theme.inc +++ b/apps/drupal-default/particle_theme/includes/misc.theme.inc @@ -6,7 +6,7 @@ */ /** - * add body class to error pages for background change. + * Add body class to error pages for background change. */ function particle_preprocess_html(&$variables) { $statusCode = Drupal::request()->query->get('_exception_statuscode'); diff --git a/apps/drupal-default/particle_theme/includes/page_attachments.inc b/apps/drupal-default/particle_theme/includes/page_attachments.inc index 6a05e07a3d..66d9e3f035 100755 --- a/apps/drupal-default/particle_theme/includes/page_attachments.inc +++ b/apps/drupal-default/particle_theme/includes/page_attachments.inc @@ -2,6 +2,7 @@ /** * @file + * Hooks related to page attachments. */ /** @@ -9,16 +10,12 @@ */ function particle_page_attachments_alter(array &$attachments) { - /** - * Attach custom CSS file - */ + // Attach custom CSS file. if (theme_get_setting('themag_use_custom_css_file')) { $attachments['#attached']['library'][] = 'particle/custom-css'; } - /** - * Attach custom JS file - */ + // Attach custom JS file. if (theme_get_setting('particle_use_custom_js_file')) { $attachments['#attached']['library'][] = 'particle/custom-js'; } diff --git a/apps/drupal-default/particle_theme/includes/theme_variables.inc b/apps/drupal-default/particle_theme/includes/theme_variables.inc index f05d84c72a..779e6356c3 100644 --- a/apps/drupal-default/particle_theme/includes/theme_variables.inc +++ b/apps/drupal-default/particle_theme/includes/theme_variables.inc @@ -2,6 +2,7 @@ /** * @file + * Hooks related to general theming. */ /**