@@ -9,8 +9,7 @@ |
||
| 9 | 9 | if ($extension == 'image') { |
| 10 | 10 | $path = drupal_get_path('module', 'df_tools_frontend'); |
| 11 | 11 | $libraries['quickedit.inPlaceEditor.image']['js']['/' . $path . '/js/quickedit_image_browser.js'] = []; |
| 12 | - } |
|
| 13 | - else if ($extension === 'lightning_media') { |
|
| 12 | + } else if ($extension === 'lightning_media') { |
|
| 14 | 13 | $path = drupal_get_path('module', 'df_tools_frontend'); |
| 15 | 14 | $libraries['browser.styling']['css']['component']['/' . $path . '/css/lightning_media.css'] = []; |
| 16 | 15 | } |
@@ -47,8 +47,7 @@ discard block |
||
| 47 | 47 | if (in_array($mime, $allowed_mime, TRUE)) { |
| 48 | 48 | $data = base64_encode(file_get_contents($logo)); |
| 49 | 49 | $logo_url = 'data: ' . $mime . ';base64,' . $data; |
| 50 | - } |
|
| 51 | - else { |
|
| 50 | + } else { |
|
| 52 | 51 | $logo_url = FALSE; |
| 53 | 52 | } |
| 54 | 53 | |
@@ -56,8 +55,7 @@ discard block |
||
| 56 | 55 | $template_file = drupal_get_path('theme', $theme) . '/inky_templates/compiled/styled_email.html.twig'; |
| 57 | 56 | if (file_exists($template_file)) { |
| 58 | 57 | $template = str_replace(["'{{","}}'"], ['{{','}}'], file_get_contents($template_file)); |
| 59 | - } |
|
| 60 | - else { |
|
| 58 | + } else { |
|
| 61 | 59 | $template = '{{ message }}'; |
| 62 | 60 | } |
| 63 | 61 | |
@@ -264,8 +264,7 @@ |
||
| 264 | 264 | else { |
| 265 | 265 | $chunk = _color_shift($palette[$base], $default_color_mapping[$base], $chunk, $info['blend_target']); |
| 266 | 266 | } |
| 267 | - } |
|
| 268 | - else { |
|
| 267 | + } else { |
|
| 269 | 268 | // Determine the most suitable base color for the next color. |
| 270 | 269 | |
| 271 | 270 | // 'a' declarations. Use link. |
@@ -99,8 +99,7 @@ |
||
| 99 | 99 | $login_wrapper['form'] = $form; |
| 100 | 100 | |
| 101 | 101 | $block['wrapper'] = $login_wrapper; |
| 102 | - } |
|
| 103 | - else { |
|
| 102 | + } else { |
|
| 104 | 103 | $username = $this->user->getDisplayName(); |
| 105 | 104 | $user_page_url = Url::fromRoute('user.page')->toString(); |
| 106 | 105 | $user_logout_url = Url::fromRoute('user.logout')->toString(); |
@@ -29,8 +29,7 @@ |
||
| 29 | 29 | // Copy and return the entity. |
| 30 | 30 | if ($copy = $this->replicator->replicateEntity($entity)) { |
| 31 | 31 | return $copy; |
| 32 | - } |
|
| 33 | - else { |
|
| 32 | + } else { |
|
| 34 | 33 | return false; |
| 35 | 34 | } |
| 36 | 35 | } |
@@ -25,8 +25,7 @@ |
||
| 25 | 25 | $data = file_get_contents($path); |
| 26 | 26 | $uri = file_build_uri($image); |
| 27 | 27 | $file = file_save_data($data, $uri); |
| 28 | - } |
|
| 29 | - else { |
|
| 28 | + } else { |
|
| 30 | 29 | $file = reset($files); |
| 31 | 30 | } |
| 32 | 31 | |
@@ -34,8 +34,7 @@ discard block |
||
| 34 | 34 | ]; |
| 35 | 35 | } |
| 36 | 36 | unset($build[$field_name]); |
| 37 | - } |
|
| 38 | - else if ($field_name != 'field_hero_image') { |
|
| 37 | + } else if ($field_name != 'field_hero_image') { |
|
| 39 | 38 | $wrapper['#children'][$field_name] = $build[$field_name]; |
| 40 | 39 | unset($build[$field_name]); |
| 41 | 40 | } |
@@ -76,8 +75,7 @@ discard block |
||
| 76 | 75 | if ($r + $g + $b > 382) { |
| 77 | 76 | $wrapper['#children']['field_hero_link'][0]['#attributes']['class'][] = 'hero-link-light-bg'; |
| 78 | 77 | $style .= 'border-color:black;color:black;'; |
| 79 | - } |
|
| 80 | - else { |
|
| 78 | + } else { |
|
| 81 | 79 | $wrapper['#children']['field_hero_link'][0]['#attributes']['class'][] = 'hero-link-dark-bg'; |
| 82 | 80 | $style .= 'border-color:white;color:white;'; |
| 83 | 81 | } |
@@ -187,8 +185,7 @@ discard block |
||
| 187 | 185 | } |
| 188 | 186 | } |
| 189 | 187 | |
| 190 | - } |
|
| 191 | - else if ($form['plugin_id']['#value'] == 'image_embed' && !$form_state->isProcessingInput()) { |
|
| 188 | + } else if ($form['plugin_id']['#value'] == 'image_embed' && !$form_state->isProcessingInput()) { |
|
| 192 | 189 | $form['#attached']['library'][] = 'df_tools_blocks/auto_open'; |
| 193 | 190 | $form['#attributes']['data-df-tools-blocks-auto-open'] = 'settings_selection_fids_entity_browser'; |
| 194 | 191 | } |
@@ -340,14 +337,12 @@ discard block |
||
| 340 | 337 | if (isset($block_info[$key])) { |
| 341 | 338 | if (isset($category_map[$category])) { |
| 342 | 339 | $block_info[$key]['category'] = t($category_map[$category]); |
| 343 | - } |
|
| 344 | - else if (is_string($block_info[$key]['category'])) { |
|
| 340 | + } else if (is_string($block_info[$key]['category'])) { |
|
| 345 | 341 | $block_info[$key]['category'] = t($block_info[$key]['category']); |
| 346 | 342 | } |
| 347 | 343 | if (isset($label_map[$label])) { |
| 348 | 344 | $block_info[$key]['label'] = $label_map[$label]; |
| 349 | - } |
|
| 350 | - else if (is_string($block_info[$key]['label'])) { |
|
| 345 | + } else if (is_string($block_info[$key]['label'])) { |
|
| 351 | 346 | $block_info[$key]['label'] = t($block_info[$key]['label']); |
| 352 | 347 | } |
| 353 | 348 | } |
@@ -42,8 +42,7 @@ |
||
| 42 | 42 | // If the display was created anew, its previous status is effectively |
| 43 | 43 | // FALSE. |
| 44 | 44 | $original_status = FALSE; |
| 45 | - } |
|
| 46 | - else { |
|
| 45 | + } else { |
|
| 47 | 46 | $original_status = $display->status(); |
| 48 | 47 | } |
| 49 | 48 | |
@@ -71,8 +71,7 @@ discard block |
||
| 71 | 71 | $session->switchToIFrame('entity_browser_iframe_image_browser'); |
| 72 | 72 | // This might be vestigial. |
| 73 | 73 | sleep(10); |
| 74 | - } |
|
| 75 | - else { |
|
| 74 | + } else { |
|
| 76 | 75 | throw new ElementNotFoundException($session->getDriver(), 'collapsible element'); |
| 77 | 76 | } |
| 78 | 77 | } |
@@ -92,8 +91,7 @@ discard block |
||
| 92 | 91 | public function selectItem($n, $browser_id = NULL) { |
| 93 | 92 | if ($browser_id) { |
| 94 | 93 | $selector = 'form#entity-browser-' . Html::cleanCssIdentifier($browser_id) . '-form'; |
| 95 | - } |
|
| 96 | - else { |
|
| 94 | + } else { |
|
| 97 | 95 | $selector = 'form[data-entity-browser-uuid]'; |
| 98 | 96 | } |
| 99 | 97 | |