@@ -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 | /** |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | || |
351 | 351 | $this->keepBrokenHtml |
352 | 352 | ) { |
353 | - $html = '<' . self::$domHtmlWrapperHelper . '>' . $html . '</' . self::$domHtmlWrapperHelper . '>'; |
|
353 | + $html = '<'.self::$domHtmlWrapperHelper.'>'.$html.'</'.self::$domHtmlWrapperHelper.'>'; |
|
354 | 354 | } |
355 | 355 | |
356 | 356 | $html = self::replaceToPreserveHtmlEntities($html); |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | /** @noinspection StringFragmentMisplacedInspection */ |
377 | 377 | if (\stripos('<?xml', $html) !== 0) { |
378 | 378 | $xmlHackUsed = true; |
379 | - $html = '<?xml encoding="' . $this->getEncoding() . '" ?>' . $html; |
|
379 | + $html = '<?xml encoding="'.$this->getEncoding().'" ?>'.$html; |
|
380 | 380 | } |
381 | 381 | |
382 | 382 | $this->document->loadHTML($html, $optionsXml); |
@@ -908,11 +908,11 @@ discard block |
||
908 | 908 | |
909 | 909 | $html = (string) \preg_replace_callback( |
910 | 910 | '/(?<start>.*)<(?<element_start>[a-z]+)(?<element_start_addon> [^>]*)?>(?<value>.*?)<\/(?<element_end>\2)>(?<end>.*)/sui', |
911 | - static function ($matches) { |
|
912 | - return $matches['start'] . |
|
913 | - '°lt_simple_html_dom__voku_°' . $matches['element_start'] . $matches['element_start_addon'] . '°gt_simple_html_dom__voku_°' . |
|
914 | - $matches['value'] . |
|
915 | - '°lt/_simple_html_dom__voku_°' . $matches['element_end'] . '°gt_simple_html_dom__voku_°' . |
|
911 | + static function($matches) { |
|
912 | + return $matches['start']. |
|
913 | + '°lt_simple_html_dom__voku_°'.$matches['element_start'].$matches['element_start_addon'].'°gt_simple_html_dom__voku_°'. |
|
914 | + $matches['value']. |
|
915 | + '°lt/_simple_html_dom__voku_°'.$matches['element_end'].'°gt_simple_html_dom__voku_°'. |
|
916 | 916 | $matches['end']; |
917 | 917 | }, |
918 | 918 | $html |
@@ -924,7 +924,7 @@ discard block |
||
924 | 924 | |
925 | 925 | $html = (string) \preg_replace_callback( |
926 | 926 | '/(?<start>[^<]*)?(?<broken>(?:(?:<\/\w+(?:\s+\w+=\\"[^\"]+\\")*+)(?:[^<]+)>)+)(?<end>.*)/u', |
927 | - static function ($matches) { |
|
927 | + static function($matches) { |
|
928 | 928 | $matches['broken'] = \str_replace( |
929 | 929 | ['°lt/_simple_html_dom__voku_°', '°lt_simple_html_dom__voku_°', '°gt_simple_html_dom__voku_°'], |
930 | 930 | ['</', '<', '>'], |
@@ -932,9 +932,9 @@ discard block |
||
932 | 932 | ); |
933 | 933 | |
934 | 934 | self::$domBrokenReplaceHelper['orig'][] = $matches['broken']; |
935 | - self::$domBrokenReplaceHelper['tmp'][] = $matchesHash = self::$domHtmlBrokenHtmlHelper . \crc32($matches['broken']); |
|
935 | + self::$domBrokenReplaceHelper['tmp'][] = $matchesHash = self::$domHtmlBrokenHtmlHelper.\crc32($matches['broken']); |
|
936 | 936 | |
937 | - return $matches['start'] . $matchesHash . $matches['end']; |
|
937 | + return $matches['start'].$matchesHash.$matches['end']; |
|
938 | 938 | }, |
939 | 939 | $html |
940 | 940 | ); |
@@ -956,14 +956,14 @@ discard block |
||
956 | 956 | { |
957 | 957 | // regEx for e.g.: [<script id="elements-image-1" type="text/html">...</script>] |
958 | 958 | $tags = \implode('|', \array_map( |
959 | - static function ($value) { |
|
959 | + static function($value) { |
|
960 | 960 | return \preg_quote($value, '/'); |
961 | 961 | }, |
962 | 962 | $this->specialScriptTags |
963 | 963 | )); |
964 | 964 | $html = (string) \preg_replace_callback( |
965 | - '/(?<start>((?:<script) [^>]*type=(?:["\'])?(?:' . $tags . ')+(?:[^>]*)>))(?<innerContent>.*)(?<end><\/script>)/isU', |
|
966 | - function ($matches) { |
|
965 | + '/(?<start>((?:<script) [^>]*type=(?:["\'])?(?:'.$tags.')+(?:[^>]*)>))(?<innerContent>.*)(?<end><\/script>)/isU', |
|
966 | + function($matches) { |
|
967 | 967 | |
968 | 968 | // Check for logic in special script tags, like [<% _.each(tierPrices, function(item, key) { %>], |
969 | 969 | // because often this looks like non valid html in the template itself. |
@@ -973,18 +973,18 @@ discard block |
||
973 | 973 | $matches['innerContent'] = \str_replace('<\/', '</', $matches['innerContent']); |
974 | 974 | |
975 | 975 | self::$domBrokenReplaceHelper['orig'][] = $matches['innerContent']; |
976 | - self::$domBrokenReplaceHelper['tmp'][] = $matchesHash = '' . self::$domHtmlBrokenHtmlHelper . '' . \crc32($matches['innerContent']); |
|
976 | + self::$domBrokenReplaceHelper['tmp'][] = $matchesHash = ''.self::$domHtmlBrokenHtmlHelper.''.\crc32($matches['innerContent']); |
|
977 | 977 | |
978 | - return $matches['start'] . $matchesHash . $matches['end']; |
|
978 | + return $matches['start'].$matchesHash.$matches['end']; |
|
979 | 979 | } |
980 | 980 | } |
981 | 981 | |
982 | 982 | // remove the html5 fallback |
983 | 983 | $matches[0] = \str_replace('<\/', '</', $matches[0]); |
984 | 984 | |
985 | - $specialNonScript = '<' . self::$domHtmlSpecialScriptHelper . \substr($matches[0], \strlen('<script')); |
|
985 | + $specialNonScript = '<'.self::$domHtmlSpecialScriptHelper.\substr($matches[0], \strlen('<script')); |
|
986 | 986 | |
987 | - return \substr($specialNonScript, 0, -\strlen('</script>')) . '</' . self::$domHtmlSpecialScriptHelper . '>'; |
|
987 | + return \substr($specialNonScript, 0, -\strlen('</script>')).'</'.self::$domHtmlSpecialScriptHelper.'>'; |
|
988 | 988 | }, |
989 | 989 | $html |
990 | 990 | ); |