Completed
Push — master ( 01d92b...e4ee10 )
by Lars
05:00
created
src/voku/helper/HtmlDomParser.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace voku\helper;
6 6
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
    * @var string[][]
52 52
    */
53 53
   protected static $domLinkReplaceHelper = [
54
-      'orig' => ['[', ']', '{', '}',],
54
+      'orig' => ['[', ']', '{', '}', ],
55 55
       'tmp'  => [
56 56
           '!!!!SIMPLE_HTML_DOM__VOKU__SQUARE_BRACKET_LEFT!!!!',
57 57
           '!!!!SIMPLE_HTML_DOM__VOKU__SQUARE_BRACKET_RIGHT!!!!',
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     }
158 158
 
159 159
     /** @noinspection ExceptionsAnnotatingAndHandlingInspection */
160
-    throw new BadMethodCallException('Method does not exist: ' . $name);
160
+    throw new BadMethodCallException('Method does not exist: '.$name);
161 161
   }
162 162
 
163 163
   /**
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 
275 275
       if (!empty($linksOld[1])) {
276 276
         $linksOld = $linksOld[1];
277
-        foreach ((array)$linksOld as $linkKey => $linkOld) {
277
+        foreach ((array) $linksOld as $linkKey => $linkOld) {
278 278
           $linksNew[$linkKey] = \str_replace(
279 279
               self::$domLinkReplaceHelper['orig'],
280 280
               self::$domLinkReplaceHelper['tmp'],
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
       $xmlHackUsed = false;
383 383
       if (\stripos('<?xml', $html) !== 0) {
384 384
         $xmlHackUsed = true;
385
-        $html = '<?xml encoding="' . $this->getEncoding() . '" ?>' . $html;
385
+        $html = '<?xml encoding="'.$this->getEncoding().'" ?>'.$html;
386 386
       }
387 387
 
388 388
       $html = self::replaceToPreserveHtmlEntities($html);
@@ -559,8 +559,8 @@  discard block
 block discarded – undo
559 559
     }
560 560
 
561 561
     if ($this->isDOMDocumentCreatedWithoutWrapper === true) {
562
-      $content = (string)\preg_replace('/^<p>/', '', $content);
563
-      $content = (string)\preg_replace('/<\/p>/', '', $content);
562
+      $content = (string) \preg_replace('/^<p>/', '', $content);
563
+      $content = (string) \preg_replace('/<\/p>/', '', $content);
564 564
     }
565 565
 
566 566
     if ($this->isDOMDocumentCreatedWithoutHtml === true) {
@@ -713,7 +713,7 @@  discard block
 block discarded – undo
713 713
     $xml = $this->document->saveXML(null, LIBXML_NOEMPTYTAG);
714 714
 
715 715
     // remove the XML-header
716
-    $xml = \ltrim((string)\preg_replace('/<\?xml.*\?>/', '', $xml));
716
+    $xml = \ltrim((string) \preg_replace('/<\?xml.*\?>/', '', $xml));
717 717
 
718 718
     return $this->fixHtmlOutput($xml, $multiDecodeNewHtmlEntity);
719 719
   }
Please login to merge, or discard this patch.