Test Setup Failed
Branch 8.x (fadd51)
by Christopher
04:10
created
paragraphs_editor.module 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,8 +79,7 @@
 block discarded – undo
79 79
             ],
80 80
           ],
81 81
         ];
82
-      }
83
-      else {
82
+      } else {
84 83
         $form['third_party_settings']['paragraphs_editor'] += [
85 84
           'message' => [
86 85
             '#markup' => '<p>' . t('You must create a paragraph type that includes a single field of type "Text (formatted, long)", and make it available to this field in order to use Editor integration with this field.') . '</p>' .
Please login to merge, or discard this patch.
src/EditBuffer/EditBufferItemFactory.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -76,14 +76,12 @@  discard block
 block discarded – undo
76 76
         if ($paragraph) {
77 77
           if ($paragraph->getParentEntity() != $context->getEntity()) {
78 78
             $paragraph = NULL;
79
-          }
80
-          else {
79
+          } else {
81 80
             $item = $buffer->createItem($paragraph);
82 81
           }
83 82
         }
84 83
       }
85
-    }
86
-    else {
84
+    } else {
87 85
       $item = NULL;
88 86
     }
89 87
     return $item;
@@ -163,8 +161,7 @@  discard block
 block discarded – undo
163 161
     $entities = $this->storage->loadByProperties(['uuid' => $paragraph_uuid]);
164 162
     if ($entities) {
165 163
       return reset($entities);
166
-    }
167
-    else {
164
+    } else {
168 165
       return NULL;
169 166
     }
170 167
   }
Please login to merge, or discard this patch.
src/EditBuffer/EditBuffer.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
54 54
     $paragraph = isset($this->paragraphs[$paragraph_uuid]) ? $this->paragraphs[$paragraph_uuid] : NULL;
55 55
     if ($paragraph) {
56 56
       $item = $this->createEditBufferItem($paragraph);
57
-    }
58
-    else {
57
+    } else {
59 58
       $item = NULL;
60 59
     }
61 60
     return $item;
@@ -72,8 +71,7 @@  discard block
 block discarded – undo
72 71
           $paragraphs[$paragraph->uuid()] = $paragraph;
73 72
         }
74 73
       }
75
-    }
76
-    else {
74
+    } else {
77 75
       $paragraphs = $this->paragraphs;
78 76
     }
79 77
 
Please login to merge, or discard this patch.
src/EditorCommand/CommandContextFactory.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -116,24 +116,21 @@
 block discarded – undo
116 116
       if ($entity_id) {
117 117
         $entity = $entity_storage->load($entity_id, $context_keys);
118 118
         $context_keys[] = $entity_id;
119
-      }
120
-      else {
119
+      } else {
121 120
         $entity = NULL;
122 121
       }
123 122
 
124 123
       $context_string = implode(':', $context_keys);
125 124
       if ($edit_buffer_prototype) {
126 125
         $edit_buffer = $edit_buffer_prototype->createCopy($context_string);
127
-      }
128
-      else {
126
+      } else {
129 127
         $edit_buffer = $this->bufferCache->get($context_string);
130 128
       }
131 129
       $bundle_filter = $this->createBundleFilter($field_config);
132 130
       $context = new CommandContext($entity, $field_config, $edit_buffer, $bundle_filter, $settings);
133 131
       $this->attachPlugin('delivery_provider', $settings, $context);
134 132
       $this->attachPlugin('bundle_selector', $settings, $context);
135
-    }
136
-    catch (\Exception $e) {
133
+    } catch (\Exception $e) {
137 134
       return new InvalidCommandContext();
138 135
     }
139 136
     return $context;
Please login to merge, or discard this patch.
src/EditorCommand/CommandContext.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -220,8 +220,7 @@
 block discarded – undo
220 220
   public function getAdditionalContext($key = NULL) {
221 221
     if ($key) {
222 222
       return isset($this->additionalContext[$key]) ? $this->additionalContext[$key] : NULL;
223
-    }
224
-    else {
223
+    } else {
225 224
       return $this->additionalContext;
226 225
     }
227 226
   }
Please login to merge, or discard this patch.
src/EditorCommand/ResponseHandler.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -229,8 +229,7 @@
 block discarded – undo
229 229
   protected function getDialogTitle(CommandContextInterface $context) {
230 230
     if ($context->getAdditionalContext('command') == 'insert') {
231 231
       return t('Insert @title', ['@title' => $context->getSetting('title')]);
232
-    }
233
-    else {
232
+    } else {
234 233
       return t('Edit @title', ['@title' => $context->getSetting('title')]);
235 234
     }
236 235
   }
Please login to merge, or discard this patch.
src/Plugin/dom_processor/data_processor/ParagraphsEditorPreparer.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -96,12 +96,10 @@  discard block
 block discarded – undo
96 96
         $field_context_id = $data->get('field.context_id');
97 97
         $this->expandParagraph($data, $data->node(), $paragraph, $field_context_id);
98 98
         return $result;
99
-      }
100
-      elseif ($data->isRoot()) {
99
+      } elseif ($data->isRoot()) {
101 100
         return $this->finishResult($data, $result);
102 101
       }
103
-    }
104
-    elseif ($data->isRoot()) {
102
+    } elseif ($data->isRoot()) {
105 103
       return $this->generateOwnerInfo($data, $result);
106 104
     }
107 105
 
@@ -204,8 +202,7 @@  discard block
 block discarded – undo
204 202
           $this->setAttribute($field_node, 'field', '<context>', $context_id);
205 203
 
206 204
           $referenced_entities = $this->fieldValueManager->wrapItems($items)->getReferencedEntities();
207
-        }
208
-        else {
205
+        } else {
209 206
           $referenced_entities = $this->fieldValueManager->getReferencedEntities($items);
210 207
         }
211 208
 
Please login to merge, or discard this patch.
src/Plugin/dom_processor/data_processor/ParagraphsEditorExtractor.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -46,11 +46,9 @@  discard block
 block discarded – undo
46 46
   public function process(SemanticDataInterface $data, DomProcessorResultInterface $result) {
47 47
     if ($data->is($this->getSelector('widget'))) {
48 48
       return $this->processWidget($data, $result);
49
-    }
50
-    elseif ($data->is($this->getSelector('field')) || $data->isRoot()) {
49
+    } elseif ($data->is($this->getSelector('field')) || $data->isRoot()) {
51 50
       return $this->processField($data, $result);
52
-    }
53
-    else {
51
+    } else {
54 52
       return $result;
55 53
     }
56 54
   }
@@ -72,8 +70,7 @@  discard block
 block discarded – undo
72 70
 
73 71
     if ($wrapper) {
74 72
       $wrapper->addReferencedEntity($entity);
75
-    }
76
-    else {
73
+    } else {
77 74
       $result = $result->merge([
78 75
         'entities' => [
79 76
           $entity->uuid() => $entity,
@@ -108,8 +105,7 @@  discard block
 block discarded – undo
108 105
       $wrapper->setMarkup($data->getInnerHTML());
109 106
       $wrapper->setFormat($data->get('filter_format'));
110 107
       $entities = $wrapper->getEntities();
111
-    }
112
-    else {
108
+    } else {
113 109
       $entities = $result->get('entities');
114 110
       if (!$entities) {
115 111
         $entities = [];
Please login to merge, or discard this patch.
src/Plugin/dom_processor/data_processor/ParagraphsEditorRenderer.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -126,8 +126,7 @@
 block discarded – undo
126 126
               $to_render[] = $child_entity;
127 127
               $to_process[] = $child_entity;
128 128
             }
129
-          }
130
-          elseif ($this->fieldValueManager->isParagraphsField($field_definition)) {
129
+          } elseif ($this->fieldValueManager->isParagraphsField($field_definition)) {
131 130
             foreach ($this->fieldValueManager->getReferencedEntities($items) as $child_entity) {
132 131
               $to_process[] = $child_entity;
133 132
             }
Please login to merge, or discard this patch.