@@ -112,8 +112,7 @@ discard block |
||
112 | 112 | $name = 'drupal'; |
113 | 113 | } |
114 | 114 | $info['projects'][$name] = $this->buildProject($package); |
115 | - } |
|
116 | - elseif ($this->isLightning($package)) { |
|
115 | + } elseif ($this->isLightning($package)) { |
|
117 | 116 | $info['projects'][$name] = $this->buildProject($package); |
118 | 117 | |
119 | 118 | // The Lightning project uses semantic versioning. |
@@ -283,8 +282,7 @@ discard block |
||
283 | 282 | 'type' => 'get', |
284 | 283 | 'url' => $package['dist']['url'], |
285 | 284 | ]; |
286 | - } |
|
287 | - else { |
|
285 | + } else { |
|
288 | 286 | $download = [ |
289 | 287 | 'type' => 'git', |
290 | 288 | 'url' => str_replace('[email protected]:', 'https://github.com/', $package['source']['url']), |
@@ -9,8 +9,7 @@ |
||
9 | 9 | // Set container for Navbar |
10 | 10 | if (theme_get_setting('navbar_full_width')) { |
11 | 11 | $variables['navbar_width'] = 'container-fluid'; |
12 | - } |
|
13 | - else { |
|
12 | + } else { |
|
14 | 13 | $variables['navbar_width'] = 'container'; |
15 | 14 | } |
16 | 15 |
@@ -95,8 +95,7 @@ discard block |
||
95 | 95 | ]; |
96 | 96 | } |
97 | 97 | unset($build[$field_name]); |
98 | - } |
|
99 | - elseif ($field_name !== 'field_hero_background') { |
|
98 | + } elseif ($field_name !== 'field_hero_background') { |
|
100 | 99 | $wrapper['#children'][$field_name] = $build[$field_name]; |
101 | 100 | unset($build[$field_name]); |
102 | 101 | } |
@@ -139,8 +138,7 @@ discard block |
||
139 | 138 | if ($r + $g + $b > 382) { |
140 | 139 | $wrapper['#children']['field_hero_link'][0]['#attributes']['class'][] = 'hero-link-light-bg'; |
141 | 140 | $style .= 'border-color:black;color:black;'; |
142 | - } |
|
143 | - else { |
|
141 | + } else { |
|
144 | 142 | $wrapper['#children']['field_hero_link'][0]['#attributes']['class'][] = 'hero-link-dark-bg'; |
145 | 143 | $style .= 'border-color:white;color:white;'; |
146 | 144 | } |
@@ -274,8 +272,7 @@ discard block |
||
274 | 272 | unset($form['flipper']['front']['settings']['view_mode']['#options'][$view_mode]); |
275 | 273 | } |
276 | 274 | } |
277 | - } |
|
278 | - elseif ($form['plugin_id']['#value'] === 'media_embed') { |
|
275 | + } elseif ($form['plugin_id']['#value'] === 'media_embed') { |
|
279 | 276 | if (empty(Element::getVisibleChildren($form['flipper']['front']['settings']['selection']['table'])) && !$form_state->isProcessingInput()) { |
280 | 277 | $form['#attached']['library'][] = 'df_tools_blocks/auto_open'; |
281 | 278 | $form['#attributes']['data-df-tools-blocks-auto-open'] = 'settings_selection_mids_entity_browser'; |
@@ -453,16 +450,14 @@ discard block |
||
453 | 450 | if (isset($category_map[$category])) { |
454 | 451 | // Already translated. |
455 | 452 | $block_info[$key]['category'] = $category_map[$category]; |
456 | - } |
|
457 | - elseif (is_string($block_info[$key]['category'])) { |
|
453 | + } elseif (is_string($block_info[$key]['category'])) { |
|
458 | 454 | // Already translated. |
459 | 455 | $block_info[$key]['category'] = $block_info[$key]['category']; |
460 | 456 | } |
461 | 457 | if (isset($label_map[$label])) { |
462 | 458 | // Already translated. |
463 | 459 | $block_info[$key]['label'] = $label_map[$label]; |
464 | - } |
|
465 | - elseif (is_string($block_info[$key]['label'])) { |
|
460 | + } elseif (is_string($block_info[$key]['label'])) { |
|
466 | 461 | // Already translated. |
467 | 462 | $block_info[$key]['label'] = $block_info[$key]['label']; |
468 | 463 | } |
@@ -28,8 +28,7 @@ discard block |
||
28 | 28 | if ($arg[0] == 'node' && isset($arg[1])) { |
29 | 29 | if ($arg[1] == 'add') { |
30 | 30 | $section = 'node-add'; |
31 | - } |
|
32 | - elseif (isset($arg[2]) && is_numeric($arg[1]) && ($arg[2] == 'edit' || $arg[2] == 'delete')) { |
|
31 | + } elseif (isset($arg[2]) && is_numeric($arg[1]) && ($arg[2] == 'edit' || $arg[2] == 'delete')) { |
|
33 | 32 | $section = 'node-' . $arg[2]; |
34 | 33 | } |
35 | 34 | } |
@@ -39,8 +38,7 @@ discard block |
||
39 | 38 | // Store the menu item since it has some useful information. |
40 | 39 | if ($request->attributes->get('view_id')) { |
41 | 40 | $variables['attributes']['class'][] = 'views-page'; |
42 | - } |
|
43 | - elseif ($request->attributes->get('panel')) { |
|
41 | + } elseif ($request->attributes->get('panel')) { |
|
44 | 42 | $variables['attributes']['class'][] = 'panels-page'; |
45 | 43 | } |
46 | 44 | } |
@@ -23,8 +23,7 @@ discard block |
||
23 | 23 | function df_tools_media_views_insert(ViewEntityInterface $view) { |
24 | 24 | if (\Drupal::isConfigSyncing()) { |
25 | 25 | return; |
26 | - } |
|
27 | - elseif (drupal_installation_attempted() && $view->id() == 'media') { |
|
26 | + } elseif (drupal_installation_attempted() && $view->id() == 'media') { |
|
28 | 27 | $display1 = &$view->getDisplay('entity_browser_1'); |
29 | 28 | $display2 = &$view->getDisplay('entity_browser_2'); |
30 | 29 | $display1['display_options']['filters']['field_tags_target_id'] = $display2['display_options']['filters']['field_tags_target_id'] = [ |
@@ -159,8 +158,7 @@ discard block |
||
159 | 158 | $entity->$image_field->focal_point = $x_y; |
160 | 159 | $entity->$image_field->alt = $entity->label(); |
161 | 160 | $entity->$image_field->target_id = $file->id(); |
162 | - } |
|
163 | - elseif (in_array($type, $types) |
|
161 | + } elseif (in_array($type, $types) |
|
164 | 162 | && $entity->hasField($image_field) |
165 | 163 | && !$entity->get($image_field)->isEmpty() |
166 | 164 | && $entity->hasField($unsplash_field) |
@@ -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 |
@@ -13,40 +13,35 @@ |
||
13 | 13 | // Make Page Mangers pages full width |
14 | 14 | elseif (\Drupal::routeMatch()->getRouteObject()->hasDefault('page_manager_page')) { |
15 | 15 | $variables['container_class'] = 'container-fluid full'; |
16 | - } |
|
17 | - else { |
|
16 | + } else { |
|
18 | 17 | $variables['container_class'] = 'container'; |
19 | 18 | } |
20 | 19 | |
21 | 20 | // Set container for Meta Header |
22 | 21 | if (theme_get_setting('meta_header_full_width')) { |
23 | 22 | $variables['meta_header_width'] = 'container-fluid'; |
24 | - } |
|
25 | - else { |
|
23 | + } else { |
|
26 | 24 | $variables['meta_header_width'] = 'container'; |
27 | 25 | } |
28 | 26 | |
29 | 27 | // Set container for Navbar |
30 | 28 | if (theme_get_setting('navbar_full_width')) { |
31 | 29 | $variables['navbar_width'] = 'container-fluid'; |
32 | - } |
|
33 | - else { |
|
30 | + } else { |
|
34 | 31 | $variables['navbar_width'] = 'container'; |
35 | 32 | } |
36 | 33 | |
37 | 34 | // Set container for Header |
38 | 35 | if (theme_get_setting('header_full_width')) { |
39 | 36 | $variables['header_width'] = 'container-fluid'; |
40 | - } |
|
41 | - else { |
|
37 | + } else { |
|
42 | 38 | $variables['header_width'] = 'container'; |
43 | 39 | } |
44 | 40 | |
45 | 41 | // Set container for Footer |
46 | 42 | if (theme_get_setting('footer_full_width')) { |
47 | 43 | $variables['footer_width'] = 'container-fluid'; |
48 | - } |
|
49 | - else { |
|
44 | + } else { |
|
50 | 45 | $variables['footer_width'] = 'container'; |
51 | 46 | } |
52 | 47 | } |