@@ -102,8 +102,7 @@ discard block |
||
| 102 | 102 | $this->ensureMyTable(); |
| 103 | 103 | if (is_array($this->value)) { |
| 104 | 104 | $location = $this->value[0]; |
| 105 | - } |
|
| 106 | - else { |
|
| 105 | + } else { |
|
| 107 | 106 | $location = $this->value; |
| 108 | 107 | } |
| 109 | 108 | |
@@ -150,8 +149,7 @@ discard block |
||
| 150 | 149 | foreach ($options as $key => $option) { |
| 151 | 150 | if (is_numeric($option)) { |
| 152 | 151 | $formula = str_replace(':' . $key, $option, $formula); |
| 153 | - } |
|
| 154 | - else { |
|
| 152 | + } else { |
|
| 155 | 153 | $formula = str_replace(':' . $key, db_escape_field($option), $formula); |
| 156 | 154 | } |
| 157 | 155 | } |
@@ -90,8 +90,7 @@ discard block |
||
| 90 | 90 | $entity_view_mode_ids = array_keys($this->entityManager()->getViewModes($entity->getEntityTypeId())); |
| 91 | 91 | if (in_array($view_mode_id, $entity_view_mode_ids)) { |
| 92 | 92 | $output = $entity->$field_name->view($view_mode_id); |
| 93 | - } |
|
| 94 | - else { |
|
| 93 | + } else { |
|
| 95 | 94 | // Each part of a custom (non-Entity Display) view mode ID is separated |
| 96 | 95 | // by a dash; the first part must be the module name. |
| 97 | 96 | $mode_id_parts = explode('-', $view_mode_id, 2); |
@@ -108,8 +107,7 @@ discard block |
||
| 108 | 107 | 'html' => $this->renderer->renderRoot($output), |
| 109 | 108 | ]; |
| 110 | 109 | return new JsonResponse($data); |
| 111 | - } |
|
| 112 | - else { |
|
| 110 | + } else { |
|
| 113 | 111 | return new JsonResponse(['main_error' => $this->t('File does not exist.')]); |
| 114 | 112 | } |
| 115 | 113 | } |
@@ -40,8 +40,7 @@ |
||
| 40 | 40 | $widget_form['#title'] = ''; |
| 41 | 41 | $widget_form['entity_id']['#title'] = t('Existing slide'); |
| 42 | 42 | $widget_form['actions']['ief_reference_save']['#value'] = t('Add'); |
| 43 | - } |
|
| 44 | - else { |
|
| 43 | + } else { |
|
| 45 | 44 | $widget_form['inline_entity_form']['#ief_labels']['singular'] = 'slide'; |
| 46 | 45 | } |
| 47 | 46 | } |
@@ -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. |
@@ -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 | } |
@@ -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 | |
@@ -53,8 +53,7 @@ |
||
| 53 | 53 | foreach ($arguments as $argument) { |
| 54 | 54 | if ($argument{0} == '-') { |
| 55 | 55 | $task->rawArg($argument); |
| 56 | - } |
|
| 57 | - else { |
|
| 56 | + } else { |
|
| 58 | 57 | $feature = "tests/features/$argument"; |
| 59 | 58 | |
| 60 | 59 | if (file_exists("$feature.feature")) { |
@@ -126,8 +126,7 @@ |
||
| 126 | 126 | $coordinates = $this->getSetting('show_coordinates'); |
| 127 | 127 | if ($coordinates) { |
| 128 | 128 | $summary[] = $this->t('Coordinates are shown'); |
| 129 | - } |
|
| 130 | - else { |
|
| 129 | + } else { |
|
| 131 | 130 | $summary[] = $this->t('Coordinates are hidden'); |
| 132 | 131 | } |
| 133 | 132 | |
@@ -68,8 +68,7 @@ discard block |
||
| 68 | 68 | if (isset($options['langcode'])) { |
| 69 | 69 | $url_options['language'] = \Drupal::languageManager()->getLanguage($options['langcode']); |
| 70 | 70 | $langcode = $options['langcode']; |
| 71 | - } |
|
| 72 | - else { |
|
| 71 | + } else { |
|
| 73 | 72 | $langcode = NULL; |
| 74 | 73 | } |
| 75 | 74 | |
@@ -93,8 +92,7 @@ discard block |
||
| 93 | 92 | $replacements[$original] = Url::fromRoute('entity.node.latest_version', [ |
| 94 | 93 | 'node' => $node->id(), |
| 95 | 94 | ], $url_options)->toString(); |
| 96 | - } |
|
| 97 | - else { |
|
| 95 | + } else { |
|
| 98 | 96 | $replacements[$original] = $latest->toUrl('canonical', $url_options)->toString(); |
| 99 | 97 | } |
| 100 | 98 | break; |