@@ -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(); |
@@ -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') { |
|
| 188 | + } else if ($form['plugin_id']['#value'] == 'image_embed') { |
|
| 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 | } |
@@ -332,8 +329,7 @@ discard block |
||
| 332 | 329 | if (isset($block_info[$key])) { |
| 333 | 330 | if (isset($category_map[$category])) { |
| 334 | 331 | $block_info[$key]['category'] = t($category_map[$category]); |
| 335 | - } |
|
| 336 | - else if (is_string($block_info[$key]['category'])) { |
|
| 332 | + } else if (is_string($block_info[$key]['category'])) { |
|
| 337 | 333 | $block_info[$key]['category'] = t($block_info[$key]['category']); |
| 338 | 334 | } |
| 339 | 335 | } |
@@ -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 | |