@@ -1,6 +1,6 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |