@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | return \call_user_func_array([$this, self::$functionAliases[$name]], $arguments); |
166 | 166 | } |
167 | 167 | |
168 | - throw new \BadMethodCallException('Method does not exist: ' . $name); |
|
168 | + throw new \BadMethodCallException('Method does not exist: '.$name); |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | /** |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | && |
318 | 318 | \trim($matches_after_html[1]) |
319 | 319 | ) { |
320 | - $html = \str_replace($matches_after_html[0], $matches_after_html[1] . '</html>', $html); |
|
320 | + $html = \str_replace($matches_after_html[0], $matches_after_html[1].'</html>', $html); |
|
321 | 321 | } |
322 | 322 | } |
323 | 323 | |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | || |
362 | 362 | $this->keepBrokenHtml |
363 | 363 | ) { |
364 | - $html = '<' . self::$domHtmlWrapperHelper . '>' . $html . '</' . self::$domHtmlWrapperHelper . '>'; |
|
364 | + $html = '<'.self::$domHtmlWrapperHelper.'>'.$html.'</'.self::$domHtmlWrapperHelper.'>'; |
|
365 | 365 | } |
366 | 366 | |
367 | 367 | $html = self::replaceToPreserveHtmlEntities($html); |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | /** @noinspection StringFragmentMisplacedInspection */ |
388 | 388 | if (\stripos('<?xml', $html) !== 0) { |
389 | 389 | $xmlHackUsed = true; |
390 | - $html = '<?xml encoding="' . $this->getEncoding() . '" ?>' . $html; |
|
390 | + $html = '<?xml encoding="'.$this->getEncoding().'" ?>'.$html; |
|
391 | 391 | } |
392 | 392 | |
393 | 393 | $this->document->loadHTML($html, $optionsXml); |
@@ -948,11 +948,11 @@ discard block |
||
948 | 948 | |
949 | 949 | $html = (string) \preg_replace_callback( |
950 | 950 | '/(?<start>.*)<(?<element_start>[a-z]+)(?<element_start_addon> [^>]*)?>(?<value>.*?)<\/(?<element_end>\2)>(?<end>.*)/sui', |
951 | - static function ($matches) { |
|
952 | - return $matches['start'] . |
|
953 | - '°lt_simple_html_dom__voku_°' . $matches['element_start'] . $matches['element_start_addon'] . '°gt_simple_html_dom__voku_°' . |
|
954 | - $matches['value'] . |
|
955 | - '°lt/_simple_html_dom__voku_°' . $matches['element_end'] . '°gt_simple_html_dom__voku_°' . |
|
951 | + static function($matches) { |
|
952 | + return $matches['start']. |
|
953 | + '°lt_simple_html_dom__voku_°'.$matches['element_start'].$matches['element_start_addon'].'°gt_simple_html_dom__voku_°'. |
|
954 | + $matches['value']. |
|
955 | + '°lt/_simple_html_dom__voku_°'.$matches['element_end'].'°gt_simple_html_dom__voku_°'. |
|
956 | 956 | $matches['end']; |
957 | 957 | }, |
958 | 958 | $html |
@@ -964,7 +964,7 @@ discard block |
||
964 | 964 | |
965 | 965 | $html = (string) \preg_replace_callback( |
966 | 966 | '/(?<start>[^<]*)?(?<broken>(?:(?:<\/\w+(?:\s+\w+=\\"[^\"]+\\")*+)(?:[^<]+)>)+)(?<end>.*)/u', |
967 | - static function ($matches) { |
|
967 | + static function($matches) { |
|
968 | 968 | $matches['broken'] = \str_replace( |
969 | 969 | ['°lt/_simple_html_dom__voku_°', '°lt_simple_html_dom__voku_°', '°gt_simple_html_dom__voku_°'], |
970 | 970 | ['</', '<', '>'], |
@@ -972,9 +972,9 @@ discard block |
||
972 | 972 | ); |
973 | 973 | |
974 | 974 | self::$domBrokenReplaceHelper['orig'][] = $matches['broken']; |
975 | - self::$domBrokenReplaceHelper['tmp'][] = $matchesHash = self::$domHtmlBrokenHtmlHelper . \crc32($matches['broken']); |
|
975 | + self::$domBrokenReplaceHelper['tmp'][] = $matchesHash = self::$domHtmlBrokenHtmlHelper.\crc32($matches['broken']); |
|
976 | 976 | |
977 | - return $matches['start'] . $matchesHash . $matches['end']; |
|
977 | + return $matches['start'].$matchesHash.$matches['end']; |
|
978 | 978 | }, |
979 | 979 | $html |
980 | 980 | ); |
@@ -996,14 +996,14 @@ discard block |
||
996 | 996 | { |
997 | 997 | // regEx for e.g.: [<script id="elements-image-1" type="text/html">...</script>] |
998 | 998 | $tags = \implode('|', \array_map( |
999 | - static function ($value) { |
|
999 | + static function($value) { |
|
1000 | 1000 | return \preg_quote($value, '/'); |
1001 | 1001 | }, |
1002 | 1002 | $this->specialScriptTags |
1003 | 1003 | )); |
1004 | 1004 | $html = (string) \preg_replace_callback( |
1005 | - '/(?<start>((?:<script) [^>]*type=(?:["\'])?(?:' . $tags . ')+(?:[^>]*)>))(?<innerContent>.*)(?<end><\/script>)/isU', |
|
1006 | - function ($matches) { |
|
1005 | + '/(?<start>((?:<script) [^>]*type=(?:["\'])?(?:'.$tags.')+(?:[^>]*)>))(?<innerContent>.*)(?<end><\/script>)/isU', |
|
1006 | + function($matches) { |
|
1007 | 1007 | |
1008 | 1008 | // Check for logic in special script tags, like [<% _.each(tierPrices, function(item, key) { %>], |
1009 | 1009 | // because often this looks like non valid html in the template itself. |
@@ -1013,18 +1013,18 @@ discard block |
||
1013 | 1013 | $matches['innerContent'] = \str_replace('<\/', '</', $matches['innerContent']); |
1014 | 1014 | |
1015 | 1015 | self::$domBrokenReplaceHelper['orig'][] = $matches['innerContent']; |
1016 | - self::$domBrokenReplaceHelper['tmp'][] = $matchesHash = '' . self::$domHtmlBrokenHtmlHelper . '' . \crc32($matches['innerContent']); |
|
1016 | + self::$domBrokenReplaceHelper['tmp'][] = $matchesHash = ''.self::$domHtmlBrokenHtmlHelper.''.\crc32($matches['innerContent']); |
|
1017 | 1017 | |
1018 | - return $matches['start'] . $matchesHash . $matches['end']; |
|
1018 | + return $matches['start'].$matchesHash.$matches['end']; |
|
1019 | 1019 | } |
1020 | 1020 | } |
1021 | 1021 | |
1022 | 1022 | // remove the html5 fallback |
1023 | 1023 | $matches[0] = \str_replace('<\/', '</', $matches[0]); |
1024 | 1024 | |
1025 | - $specialNonScript = '<' . self::$domHtmlSpecialScriptHelper . \substr($matches[0], \strlen('<script')); |
|
1025 | + $specialNonScript = '<'.self::$domHtmlSpecialScriptHelper.\substr($matches[0], \strlen('<script')); |
|
1026 | 1026 | |
1027 | - return \substr($specialNonScript, 0, -\strlen('</script>')) . '</' . self::$domHtmlSpecialScriptHelper . '>'; |
|
1027 | + return \substr($specialNonScript, 0, -\strlen('</script>')).'</'.self::$domHtmlSpecialScriptHelper.'>'; |
|
1028 | 1028 | }, |
1029 | 1029 | $html |
1030 | 1030 | ); |