diff options
author | quietone <quietone@2572884.no-reply.drupal.org> | 2024-11-17 17:37:29 +1300 |
---|---|---|
committer | quietone <quietone@2572884.no-reply.drupal.org> | 2024-11-17 17:37:29 +1300 |
commit | be64557b884ec2c730732aa15d3c0784f8f23da3 (patch) | |
tree | f82c59d776a44dd439ab305b563fb07a4f45d793 /core/modules/comment/comment.module | |
parent | f8e5acb7643f787cf58dee689c76d13e29c8aa43 (diff) | |
download | drupal-be64557b884ec2c730732aa15d3c0784f8f23da3.tar.gz drupal-be64557b884ec2c730732aa15d3c0784f8f23da3.zip |
Issue #3483299 by tstoeckler, mstrelan, nicxvan: Add void return type to all preprocess hook implementations
Diffstat (limited to 'core/modules/comment/comment.module')
-rw-r--r-- | core/modules/comment/comment.module | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index fc3b898dfb33..47f024f3ce15 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -113,7 +113,7 @@ function comment_preview(CommentInterface $comment, FormStateInterface $form_sta /** * Implements hook_preprocess_HOOK() for block templates. */ -function comment_preprocess_block(&$variables) { +function comment_preprocess_block(&$variables): void { if ($variables['configuration']['provider'] == 'comment') { $variables['attributes']['role'] = 'navigation'; } @@ -138,7 +138,7 @@ function comment_preprocess_block(&$variables) { * - elements: An associative array containing the comment and entity objects. * Array keys: #comment, #commented_entity. */ -function template_preprocess_comment(&$variables) { +function template_preprocess_comment(&$variables): void { /** @var \Drupal\Core\Datetime\DateFormatterInterface $date_formatter */ $date_formatter = \Drupal::service('date.formatter'); /** @var \Drupal\comment\CommentInterface $comment */ @@ -278,7 +278,7 @@ function template_preprocess_comment(&$variables) { * @todo Rename to template_preprocess_field__comment() once * https://www.drupal.org/node/939462 is resolved. */ -function comment_preprocess_field(&$variables) { +function comment_preprocess_field(&$variables): void { $element = $variables['element']; if ($element['#field_type'] == 'comment') { // Provide contextual information. |