Completed
Pull Request — 8.x-1.x (#24)
by Dave
01:59
created
src/DomHelperTrait.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,8 +92,7 @@
 block discarded – undo
92 92
       $replacement_nodes = Html::load($content)->getElementsByTagName('body')
93 93
         ->item(0)
94 94
         ->childNodes;
95
-    }
96
-    else {
95
+    } else {
97 96
       $replacement_nodes = [$node->ownerDocument->createTextNode('')];
98 97
     }
99 98
 
Please login to merge, or discard this patch.
src/EmbedType/EmbedTypeBase.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@
 block discarded – undo
54 54
     $configuration = $this->getConfiguration();
55 55
     if (array_key_exists($name, $configuration)) {
56 56
       return $configuration[$name];
57
-    }
58
-    else {
57
+    } else {
59 58
       return $default;
60 59
     }
61 60
   }
Please login to merge, or discard this patch.
src/Entity/EmbedButton.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -102,8 +102,7 @@  discard block
 block discarded – undo
102 102
   public function getTypeLabel() {
103 103
     if ($definition = $this->embedTypeManager()->getDefinition($this->getTypeId(), FALSE)) {
104 104
       return $definition['label'];
105
-    }
106
-    else {
105
+    } else {
107 106
       return $this->t('Unknown');
108 107
     }
109 108
   }
@@ -132,8 +131,7 @@  discard block
 block discarded – undo
132 131
   public function getIconUrl() {
133 132
     if ($image = $this->getIconFile()) {
134 133
       return file_create_url($image->getFileUri());
135
-    }
136
-    else {
134
+    } else {
137 135
       return $this->getTypePlugin()->getDefaultIconUrl();
138 136
     }
139 137
   }
@@ -217,8 +215,7 @@  discard block
 block discarded – undo
217 215
   public function getTypeSetting($key, $default = NULL) {
218 216
     if (isset($this->type_settings[$key])) {
219 217
       return $this->type_settings[$key];
220
-    }
221
-    else {
218
+    } else {
222 219
       return $default;
223 220
     }
224 221
   }
Please login to merge, or discard this patch.
src/EmbedButtonListBuilder.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,8 +43,7 @@
 block discarded – undo
43 43
         '#uri' => $icon_url,
44 44
         '#alt' => $this->t('Icon for the @label button.', ['@label' => $entity->label()]),
45 45
       ];
46
-    }
47
-    else {
46
+    } else {
48 47
       $row['icon'] = $this->t('None');
49 48
     }
50 49
 
Please login to merge, or discard this patch.
src/Form/EmbedButtonForm.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -122,8 +122,7 @@  discard block
 block discarded – undo
122 122
       if ($plugin = $button->getTypePlugin()) {
123 123
         $form['type_settings'] = $plugin->buildConfigurationForm($form['type_settings'], $form_state);
124 124
       }
125
-    }
126
-    catch (PluginNotFoundException $exception) {
125
+    } catch (PluginNotFoundException $exception) {
127 126
       drupal_set_message($exception->getMessage(), 'error');
128 127
       watchdog_exception('embed', $exception);
129 128
       $form['type_id']['#disabled'] = FALSE;
@@ -191,8 +190,7 @@  discard block
 block discarded – undo
191 190
     // in the config entity.
192 191
     if (!empty($icon_fid) && $file = $this->entityTypeManager->getStorage('file')->load($icon_fid)) {
193 192
       $button->set('icon_uuid', $file->uuid());
194
-    }
195
-    else {
193
+    } else {
196 194
       $button->set('icon_uuid', NULL);
197 195
     }
198 196
 
@@ -202,8 +200,7 @@  discard block
 block discarded – undo
202 200
 
203 201
     if ($status == SAVED_UPDATED) {
204 202
       drupal_set_message($this->t('The embed button %label has been updated.', $t_args));
205
-    }
206
-    elseif ($status == SAVED_NEW) {
203
+    } elseif ($status == SAVED_NEW) {
207 204
       drupal_set_message($this->t('The embed button %label has been added.', $t_args));
208 205
       $context = array_merge($t_args, ['link' => $button->link($this->t('View'), 'collection')]);
209 206
       $this->logger('embed')->notice('Added embed button %label.', $context);
Please login to merge, or discard this patch.