From a8c461cf9fbb36626267ccb5611379acbacf03c5 Mon Sep 17 00:00:00 2001 From: Tero Elonen Date: Thu, 19 Dec 2024 16:31:57 +0200 Subject: [PATCH] UHF-9507: Fix PHPCS --- hdbt.theme | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hdbt.theme b/hdbt.theme index f937ab3d5..1a4b8986e 100644 --- a/hdbt.theme +++ b/hdbt.theme @@ -942,7 +942,7 @@ function hdbt_preprocess_paragraph__unit_contact_card(array &$variables) : void $paragraph = $variables['paragraph']; $langcode = \Drupal::languageManager()->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->getId(); - // Get the unit entity and ensure it exists and has the correct translation + // Get the unit entity and ensure it exists and has the correct translation. $unit = $paragraph->get('field_unit_contact_unit') ?->first() ?->get('entity') @@ -975,7 +975,8 @@ function hdbt_preprocess_paragraph__unit_contact_card(array &$variables) : void // unit name has been overridden. if (empty($heading_value) || $heading_value === 'default') { $variables['unit_contact_card']['heading'] = t('Contact information'); - } elseif ($heading_value === 'unit_name') { + } + elseif ($heading_value === 'unit_name') { $variables['unit_contact_card']['heading'] = !empty($unit_translation?->get('name_override')->value) ? $unit_translation?->get('name_override')->view('unit_contact_card') : $unit_translation?->get('name')->view('unit_contact_card');