Completed
Pull Request — 8.x-1.x (#32)
by Janez
04:18
created
src/Plugin/Filter/ConvertUrlToEmbedFilter.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -140,8 +140,7 @@  discard block
 block discarded – undo
140 140
             function ($match) {
141 141
               if (\Drupal::service('url_embed')->getEmbed(Html::decodeEntities($match[1]))) {
142 142
                 return '<drupal-url data-embed-url="' . $match[1] . '"></drupal-url>';
143
-              }
144
-              else {
143
+              } else {
145 144
                 return $match[1];
146 145
               }
147 146
             },
@@ -150,8 +149,7 @@  discard block
 block discarded – undo
150 149
         }
151 150
         // Text chunk is done, so next chunk must be a tag.
152 151
         $chunk_type = 'tag';
153
-      }
154
-      else {
152
+      } else {
155 153
         // Only process this tag if there are no unclosed $ignore_tags.
156 154
         if ($open_tag == '') {
157 155
           // Check whether this tag is contained in $ignore_tags.
@@ -182,8 +180,7 @@  discard block
 block discarded – undo
182 180
   public function tips($long = FALSE) {
183 181
     if ($long) {
184 182
       return $this->t('<p>You can convert plain URLs to &lt;drupal-url&gt; HTML elements. Those elements are later converted to embeds using "Display embedded URLs" text filter.</p>');
185
-    }
186
-    else {
183
+    } else {
187 184
       return $this->t('You can convert plain URLs to embed elements.');
188 185
     }
189 186
   }
Please login to merge, or discard this patch.