@@ -78,8 +78,7 @@ discard block |
||
78 | 78 | ]; |
79 | 79 | } |
80 | 80 | unset($build[$field_name]); |
81 | - } |
|
82 | - elseif ($field_name !== 'field_hero_image') { |
|
81 | + } elseif ($field_name !== 'field_hero_image') { |
|
83 | 82 | $wrapper['#children'][$field_name] = $build[$field_name]; |
84 | 83 | unset($build[$field_name]); |
85 | 84 | } |
@@ -122,8 +121,7 @@ discard block |
||
122 | 121 | if ($r + $g + $b > 382) { |
123 | 122 | $wrapper['#children']['field_hero_link'][0]['#attributes']['class'][] = 'hero-link-light-bg'; |
124 | 123 | $style .= 'border-color:black;color:black;'; |
125 | - } |
|
126 | - else { |
|
124 | + } else { |
|
127 | 125 | $wrapper['#children']['field_hero_link'][0]['#attributes']['class'][] = 'hero-link-dark-bg'; |
128 | 126 | $style .= 'border-color:white;color:white;'; |
129 | 127 | } |
@@ -257,8 +255,7 @@ discard block |
||
257 | 255 | unset($form['flipper']['front']['settings']['view_mode']['#options'][$view_mode]); |
258 | 256 | } |
259 | 257 | } |
260 | - } |
|
261 | - elseif ($form['plugin_id']['#value'] === 'media_embed') { |
|
258 | + } elseif ($form['plugin_id']['#value'] === 'media_embed') { |
|
262 | 259 | if (empty(Element::getVisibleChildren($form['flipper']['front']['settings']['selection']['table'])) && !$form_state->isProcessingInput()) { |
263 | 260 | $form['#attached']['library'][] = 'df_tools_blocks/auto_open'; |
264 | 261 | $form['#attributes']['data-df-tools-blocks-auto-open'] = 'settings_selection_mids_entity_browser'; |
@@ -436,16 +433,14 @@ discard block |
||
436 | 433 | if (isset($category_map[$category])) { |
437 | 434 | // Already translated. |
438 | 435 | $block_info[$key]['category'] = $category_map[$category]; |
439 | - } |
|
440 | - elseif (is_string($block_info[$key]['category'])) { |
|
436 | + } elseif (is_string($block_info[$key]['category'])) { |
|
441 | 437 | // Already translated. |
442 | 438 | $block_info[$key]['category'] = $block_info[$key]['category']; |
443 | 439 | } |
444 | 440 | if (isset($label_map[$label])) { |
445 | 441 | // Already translated. |
446 | 442 | $block_info[$key]['label'] = $label_map[$label]; |
447 | - } |
|
448 | - elseif (is_string($block_info[$key]['label'])) { |
|
443 | + } elseif (is_string($block_info[$key]['label'])) { |
|
449 | 444 | // Already translated. |
450 | 445 | $block_info[$key]['label'] = $block_info[$key]['label']; |
451 | 446 | } |
@@ -41,8 +41,7 @@ discard block |
||
41 | 41 | // Prefer UUIDs to other fields. |
42 | 42 | if (in_array('UUID', $ids, TRUE)) { |
43 | 43 | $id_map = ['uuid', 'UUID']; |
44 | - } |
|
45 | - else { |
|
44 | + } else { |
|
46 | 45 | foreach ($processes as $field => $process) { |
47 | 46 | if (isset($process[0]['source']) && $process[0]['source'] == $ids[0]) { |
48 | 47 | $id_map = [$field, $ids[0]]; |
@@ -59,8 +58,7 @@ discard block |
||
59 | 58 | // Create a migrate executable, which we use later to set row values. |
60 | 59 | if (function_exists('drush_log')) { |
61 | 60 | $log = new DrushLogMigrateMessage(); |
62 | - } |
|
63 | - else { |
|
61 | + } else { |
|
64 | 62 | $log = new MigrateMessage(); |
65 | 63 | } |
66 | 64 | |
@@ -106,8 +104,7 @@ discard block |
||
106 | 104 | if (!$entity->hasTranslation($langcode)) { |
107 | 105 | $entity_values = $entity->toArray(); |
108 | 106 | $translation = $entity->addTranslation($langcode, $entity_values); |
109 | - } |
|
110 | - else { |
|
107 | + } else { |
|
111 | 108 | $translation = $entity->getTranslation($langcode); |
112 | 109 | } |
113 | 110 |
@@ -92,8 +92,7 @@ |
||
92 | 92 | |
93 | 93 | if (!empty($css_classes)) { |
94 | 94 | $form_state->setValue(['attributes', 'class'], $css_classes); |
95 | - } |
|
96 | - else { |
|
95 | + } else { |
|
97 | 96 | $form_state->unsetValue(['attributes', 'class']); |
98 | 97 | } |
99 | 98 | } |
@@ -55,8 +55,7 @@ |
||
55 | 55 | |
56 | 56 | drupal_set_message(t('Successfully exported Panelizer display for Node @nid to @panels_file', ['@nid' => $node->id(), '@panels_file' => $panels_file])); |
57 | 57 | return TRUE; |
58 | - } |
|
59 | - else { |
|
58 | + } else { |
|
60 | 59 | drupal_set_message(t('The given Node is not Panelized.'), 'error'); |
61 | 60 | return FALSE; |
62 | 61 | } |
@@ -113,8 +113,7 @@ |
||
113 | 113 | } |
114 | 114 | |
115 | 115 | $info['projects'][$name] = $this->buildProject($package); |
116 | - } |
|
117 | - elseif ($this->isLightning($package)) { |
|
116 | + } elseif ($this->isLightning($package)) { |
|
118 | 117 | $info['projects'][$name] = $this->buildProject($package); |
119 | 118 | |
120 | 119 | // The Lightning project uses semantic versioning. |