@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | return \call_user_func_array([$this, self::$functionAliases[$name]], $arguments); |
127 | 127 | } |
128 | 128 | |
129 | - throw new \BadMethodCallException('Method does not exist: ' . $name); |
|
129 | + throw new \BadMethodCallException('Method does not exist: '.$name); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | /** |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | || |
295 | 295 | $this->keepBrokenHtml |
296 | 296 | ) { |
297 | - $html = '<' . self::$domHtmlWrapperHelper . '>' . $html . '</' . self::$domHtmlWrapperHelper . '>'; |
|
297 | + $html = '<'.self::$domHtmlWrapperHelper.'>'.$html.'</'.self::$domHtmlWrapperHelper.'>'; |
|
298 | 298 | } |
299 | 299 | |
300 | 300 | $html = self::replaceToPreserveHtmlEntities($html); |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | /** @noinspection StringFragmentMisplacedInspection */ |
317 | 317 | if (\stripos('<?xml', $html) !== 0) { |
318 | 318 | $xmlHackUsed = true; |
319 | - $html = '<?xml encoding="' . $this->getEncoding() . '" ?>' . $html; |
|
319 | + $html = '<?xml encoding="'.$this->getEncoding().'" ?>'.$html; |
|
320 | 320 | } |
321 | 321 | |
322 | 322 | $this->document->loadHTML($html, $optionsXml); |
@@ -815,11 +815,11 @@ discard block |
||
815 | 815 | |
816 | 816 | $html = (string) \preg_replace_callback( |
817 | 817 | '/(?<start>.*)<(?<element_start>[a-z]+)(?<element_start_addon> [^>]*)?>(?<value>.*?)<\/(?<element_end>\2)>(?<end>.*)/sui', |
818 | - static function ($matches) { |
|
819 | - return $matches['start'] . |
|
820 | - '°lt_simple_html_dom__voku_°' . $matches['element_start'] . $matches['element_start_addon'] . '°gt_simple_html_dom__voku_°' . |
|
821 | - $matches['value'] . |
|
822 | - '°lt/_simple_html_dom__voku_°' . $matches['element_end'] . '°gt_simple_html_dom__voku_°' . |
|
818 | + static function($matches) { |
|
819 | + return $matches['start']. |
|
820 | + '°lt_simple_html_dom__voku_°'.$matches['element_start'].$matches['element_start_addon'].'°gt_simple_html_dom__voku_°'. |
|
821 | + $matches['value']. |
|
822 | + '°lt/_simple_html_dom__voku_°'.$matches['element_end'].'°gt_simple_html_dom__voku_°'. |
|
823 | 823 | $matches['end']; |
824 | 824 | }, |
825 | 825 | $html |
@@ -831,7 +831,7 @@ discard block |
||
831 | 831 | |
832 | 832 | $html = (string) \preg_replace_callback( |
833 | 833 | '/(?<start>[^<]*)?(?<broken>(?:(?:<\/\w+(?:\s+\w+=\\"[^\"]+\\")*+)(?:[^<]+)>)+)(?<end>.*)/u', |
834 | - static function ($matches) { |
|
834 | + static function($matches) { |
|
835 | 835 | $matches['broken'] = \str_replace( |
836 | 836 | ['°lt/_simple_html_dom__voku_°', '°lt_simple_html_dom__voku_°', '°gt_simple_html_dom__voku_°'], |
837 | 837 | ['</', '<', '>'], |
@@ -839,9 +839,9 @@ discard block |
||
839 | 839 | ); |
840 | 840 | |
841 | 841 | self::$domBrokenReplaceHelper['orig'][] = $matches['broken']; |
842 | - self::$domBrokenReplaceHelper['tmp'][] = $matchesHash = self::$domHtmlBrokenHtmlHelper . \crc32($matches['broken']); |
|
842 | + self::$domBrokenReplaceHelper['tmp'][] = $matchesHash = self::$domHtmlBrokenHtmlHelper.\crc32($matches['broken']); |
|
843 | 843 | |
844 | - return $matches['start'] . $matchesHash . $matches['end']; |
|
844 | + return $matches['start'].$matchesHash.$matches['end']; |
|
845 | 845 | }, |
846 | 846 | $html |
847 | 847 | ); |
@@ -862,7 +862,7 @@ discard block |
||
862 | 862 | // regEx for e.g.: [<script id="elements-image-1" type="text/html">...</script>] |
863 | 863 | $html = (string) \preg_replace_callback( |
864 | 864 | '/(?<start>((?:<script) [^>]*type=(?:["\'])?(?:text\/html|text\/x-custom-template)+(?:[^>]*)>))(?<innerContent>.*)(?<end><\/script>)/isU', |
865 | - static function ($matches) { |
|
865 | + static function($matches) { |
|
866 | 866 | if ( |
867 | 867 | \strpos($matches['innerContent'], '+') === false |
868 | 868 | && |
@@ -875,18 +875,18 @@ discard block |
||
875 | 875 | // remove the html5 fallback |
876 | 876 | $matches[0] = \str_replace('<\/', '</', $matches[0]); |
877 | 877 | |
878 | - $specialNonScript = '<' . self::$domHtmlSpecialScriptHelper . \substr($matches[0], \strlen('<script')); |
|
878 | + $specialNonScript = '<'.self::$domHtmlSpecialScriptHelper.\substr($matches[0], \strlen('<script')); |
|
879 | 879 | |
880 | - return \substr($specialNonScript, 0, -\strlen('</script>')) . '</' . self::$domHtmlSpecialScriptHelper . '>'; |
|
880 | + return \substr($specialNonScript, 0, -\strlen('</script>')).'</'.self::$domHtmlSpecialScriptHelper.'>'; |
|
881 | 881 | } |
882 | 882 | |
883 | 883 | // remove the html5 fallback |
884 | 884 | $matches['innerContent'] = \str_replace('<\/', '</', $matches['innerContent']); |
885 | 885 | |
886 | 886 | self::$domBrokenReplaceHelper['orig'][] = $matches['innerContent']; |
887 | - self::$domBrokenReplaceHelper['tmp'][] = $matchesHash = '' . self::$domHtmlBrokenHtmlHelper . '' . \crc32($matches['innerContent']); |
|
887 | + self::$domBrokenReplaceHelper['tmp'][] = $matchesHash = ''.self::$domHtmlBrokenHtmlHelper.''.\crc32($matches['innerContent']); |
|
888 | 888 | |
889 | - return $matches['start'] . $matchesHash . $matches['end']; |
|
889 | + return $matches['start'].$matchesHash.$matches['end']; |
|
890 | 890 | }, |
891 | 891 | $html |
892 | 892 | ); |