Skip to content

Commit

Permalink
EWPP-1539: Fix grumphp issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
22Alexandra committed Feb 1, 2022
1 parent 463739e commit ec97ea0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/oe_theme_helper/oe_theme_helper.module
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function oe_theme_helper_field_widget_oe_paragraphs_variants_form_alter(&$elemen
function template_preprocess_oe_theme_helper_in_page_navigation(array &$variables) {
$variables['title'] = $variables['element']['#title'];
$variables['entity'] = $variables['element']['#entity'];
$variables['items'] = isset($variables['element']['#items']) ? $variables['element']['#items'] : [];
$variables['items'] = $variables['element']['#items'] ?? [];

// Process in-page navigation items, assigning them a unique ID.
foreach ($variables['items'] as $key => $item) {
Expand Down
6 changes: 3 additions & 3 deletions oe_theme.theme
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ function _oe_theme_preprocess_search_input_text(array $element): array {
$ecl_array = [
'id' => $element['#attributes']['id'],
'name' => $element['#attributes']['name'],
'disabled' => isset($element['#attributes']['disabled']) ? $element['#attributes']['disabled'] : FALSE,
'disabled' => $element['#attributes']['disabled'] ?? FALSE,
'type' => $element['#attributes']['type'],
'class' => $element['#attributes']['class'],
];
Expand Down Expand Up @@ -1300,7 +1300,7 @@ function oe_theme_preprocess_table(array &$variables): void {

// Assign data to table headers as ECL expects it.
$ecl_table_header_data = [];
$variables['header'] = isset($variables['header']) ? $variables['header'] : [];
$variables['header'] = $variables['header'] ?? [];
foreach ($variables['header'] as &$cell) {
$cell['label'] = $cell['content'];

Expand All @@ -1324,7 +1324,7 @@ function oe_theme_preprocess_table(array &$variables): void {
// Account for colspan values when counting the number of columns.
// This ensures that header content is is displayed on related columns
// when the table is displayed on small screen devices.
$columns_count = isset($cell['colspan']) ? $cell['colspan'] : 1;
$columns_count = $cell['colspan'] ?? 1;
for ($i = 1; $i <= $columns_count; $i++) {
$ecl_table_header_data[] = $cell_header_data;
}
Expand Down

0 comments on commit ec97ea0

Please sign in to comment.