@@ -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 |
@@ -40,14 +40,12 @@ discard block |
||
40 | 40 | if (is_array($value)) { |
41 | 41 | if ($this->isAssociative($value)) { |
42 | 42 | $output = array_merge($output, $this->doEncode($value, $keys)); |
43 | - } |
|
44 | - else { |
|
43 | + } else { |
|
45 | 44 | foreach ($value as $j) { |
46 | 45 | $output[] = $this->keysToString($keys) . '[] = ' . $j; |
47 | 46 | } |
48 | 47 | } |
49 | - } |
|
50 | - else { |
|
48 | + } else { |
|
51 | 49 | $output[] = $this->keysToString($keys) . ' = ' . $value; |
52 | 50 | } |
53 | 51 | |
@@ -70,8 +68,7 @@ discard block |
||
70 | 68 | $head = array_shift($keys); |
71 | 69 | if ($keys) { |
72 | 70 | return $head . '[' . implode('][', $keys) . ']'; |
73 | - } |
|
74 | - else { |
|
71 | + } else { |
|
75 | 72 | return $head; |
76 | 73 | } |
77 | 74 | } |
@@ -35,8 +35,7 @@ |
||
35 | 35 | array_unshift($error, 'The following dependencies are patched but don\'t have pinned dependency constraints:'); |
36 | 36 | $event->getIO()->writeError($error); |
37 | 37 | return FALSE; |
38 | - } |
|
39 | - else { |
|
38 | + } else { |
|
40 | 39 | $event->getIO()->write('Patched dependencies have constraints that are properly pinned.'); |
41 | 40 | } |
42 | 41 | } |
@@ -132,8 +132,7 @@ discard block |
||
132 | 132 | if ($this->getSetting('image_link')) { |
133 | 133 | $summary[] = $this->t('Thumbnail is linked to entity'); |
134 | 134 | } |
135 | - } |
|
136 | - else { |
|
135 | + } else { |
|
137 | 136 | $summary[] = $this->t('Please select a responsive image style.'); |
138 | 137 | } |
139 | 138 | |
@@ -227,8 +226,7 @@ discard block |
||
227 | 226 | if ($file = $this->getFileFromEntity($block_content)) { |
228 | 227 | return $file; |
229 | 228 | } |
230 | - } |
|
231 | - else if ($block instanceof EntityField) { |
|
229 | + } else if ($block instanceof EntityField) { |
|
232 | 230 | list (, $field_name) = explode(':', $block->getDerivativeId()); |
233 | 231 | if ($entity->hasField($field_name) && $field = $entity->get($field_name)) { |
234 | 232 | if ($file = $this->getFileFromField($field)) { |
@@ -281,8 +279,7 @@ discard block |
||
281 | 279 | $referenced_entity = reset($referenced_entities); |
282 | 280 | if ($referenced_entity instanceof FileInterface) { |
283 | 281 | $return = $referenced_entity; |
284 | - } |
|
285 | - else if ($referenced_entity instanceof MediaInterface) { |
|
282 | + } else if ($referenced_entity instanceof MediaInterface) { |
|
286 | 283 | if ($depth < self::DEPTH_LIMIT && $file = $this->getFileFromEntity($referenced_entity)) { |
287 | 284 | $return = $file; |
288 | 285 | } |
@@ -206,8 +206,7 @@ discard block |
||
206 | 206 | if ($media && $media->access('view')) { |
207 | 207 | if (isset(static::$recursiveRenderDepth[$mid])) { |
208 | 208 | static::$recursiveRenderDepth[$mid]++; |
209 | - } |
|
210 | - else { |
|
209 | + } else { |
|
211 | 210 | static::$recursiveRenderDepth[$mid] = 1; |
212 | 211 | } |
213 | 212 | |
@@ -236,8 +235,7 @@ discard block |
||
236 | 235 | $mids = \Drupal::entityQuery('media') |
237 | 236 | ->condition('uuid', $this->configuration['uuids'], 'IN') |
238 | 237 | ->execute(); |
239 | - } |
|
240 | - else { |
|
238 | + } else { |
|
241 | 239 | $mids = []; |
242 | 240 | } |
243 | 241 |
@@ -48,8 +48,7 @@ discard block |
||
48 | 48 | ]; |
49 | 49 | } |
50 | 50 | unset($build[$field_name]); |
51 | - } |
|
52 | - else if ($field_name != 'field_hero_image') { |
|
51 | + } else if ($field_name != 'field_hero_image') { |
|
53 | 52 | $wrapper['#children'][$field_name] = $build[$field_name]; |
54 | 53 | unset($build[$field_name]); |
55 | 54 | } |
@@ -90,8 +89,7 @@ discard block |
||
90 | 89 | if ($r + $g + $b > 382) { |
91 | 90 | $wrapper['#children']['field_hero_link'][0]['#attributes']['class'][] = 'hero-link-light-bg'; |
92 | 91 | $style .= 'border-color:black;color:black;'; |
93 | - } |
|
94 | - else { |
|
92 | + } else { |
|
95 | 93 | $wrapper['#children']['field_hero_link'][0]['#attributes']['class'][] = 'hero-link-dark-bg'; |
96 | 94 | $style .= 'border-color:white;color:white;'; |
97 | 95 | } |
@@ -202,8 +200,7 @@ discard block |
||
202 | 200 | unset($form['flipper']['front']['settings']['view_mode']['#options'][$view_mode]); |
203 | 201 | } |
204 | 202 | } |
205 | - } |
|
206 | - else if ($form['plugin_id']['#value'] == 'media_embed') { |
|
203 | + } else if ($form['plugin_id']['#value'] == 'media_embed') { |
|
207 | 204 | if (empty(Element::getVisibleChildren($form['flipper']['front']['settings']['selection']['table'])) && !$form_state->isProcessingInput()) { |
208 | 205 | $form['#attached']['library'][] = 'df_tools_blocks/auto_open'; |
209 | 206 | $form['#attributes']['data-df-tools-blocks-auto-open'] = 'settings_selection_mids_entity_browser'; |
@@ -367,14 +364,12 @@ discard block |
||
367 | 364 | if (isset($block_info[$key])) { |
368 | 365 | if (isset($category_map[$category])) { |
369 | 366 | $block_info[$key]['category'] = t($category_map[$category]); |
370 | - } |
|
371 | - else if (is_string($block_info[$key]['category'])) { |
|
367 | + } else if (is_string($block_info[$key]['category'])) { |
|
372 | 368 | $block_info[$key]['category'] = t($block_info[$key]['category']); |
373 | 369 | } |
374 | 370 | if (isset($label_map[$label])) { |
375 | 371 | $block_info[$key]['label'] = $label_map[$label]; |
376 | - } |
|
377 | - else if (is_string($block_info[$key]['label'])) { |
|
372 | + } else if (is_string($block_info[$key]['label'])) { |
|
378 | 373 | $block_info[$key]['label'] = t($block_info[$key]['label']); |
379 | 374 | } |
380 | 375 | } |