@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | return \call_user_func_array([$this, self::$functionAliases[$name]], $arguments); |
147 | 147 | } |
148 | 148 | |
149 | - throw new \BadMethodCallException('Method does not exist: ' . $name); |
|
149 | + throw new \BadMethodCallException('Method does not exist: '.$name); |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | /** |
@@ -336,7 +336,7 @@ discard block |
||
336 | 336 | || |
337 | 337 | $this->keepBrokenHtml |
338 | 338 | ) { |
339 | - $html = '<' . self::$domHtmlWrapperHelper . '>' . $html . '</' . self::$domHtmlWrapperHelper . '>'; |
|
339 | + $html = '<'.self::$domHtmlWrapperHelper.'>'.$html.'</'.self::$domHtmlWrapperHelper.'>'; |
|
340 | 340 | } |
341 | 341 | |
342 | 342 | $html = self::replaceToPreserveHtmlEntities($html); |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | /** @noinspection StringFragmentMisplacedInspection */ |
359 | 359 | if (\stripos('<?xml', $html) !== 0) { |
360 | 360 | $xmlHackUsed = true; |
361 | - $html = '<?xml encoding="' . $this->getEncoding() . '" ?>' . $html; |
|
361 | + $html = '<?xml encoding="'.$this->getEncoding().'" ?>'.$html; |
|
362 | 362 | } |
363 | 363 | |
364 | 364 | $this->document->loadHTML($html, $optionsXml); |
@@ -891,11 +891,11 @@ discard block |
||
891 | 891 | |
892 | 892 | $html = (string) \preg_replace_callback( |
893 | 893 | '/(?<start>.*)<(?<element_start>[a-z]+)(?<element_start_addon> [^>]*)?>(?<value>.*?)<\/(?<element_end>\2)>(?<end>.*)/sui', |
894 | - static function ($matches) { |
|
895 | - return $matches['start'] . |
|
896 | - '°lt_simple_html_dom__voku_°' . $matches['element_start'] . $matches['element_start_addon'] . '°gt_simple_html_dom__voku_°' . |
|
897 | - $matches['value'] . |
|
898 | - '°lt/_simple_html_dom__voku_°' . $matches['element_end'] . '°gt_simple_html_dom__voku_°' . |
|
894 | + static function($matches) { |
|
895 | + return $matches['start']. |
|
896 | + '°lt_simple_html_dom__voku_°'.$matches['element_start'].$matches['element_start_addon'].'°gt_simple_html_dom__voku_°'. |
|
897 | + $matches['value']. |
|
898 | + '°lt/_simple_html_dom__voku_°'.$matches['element_end'].'°gt_simple_html_dom__voku_°'. |
|
899 | 899 | $matches['end']; |
900 | 900 | }, |
901 | 901 | $html |
@@ -907,7 +907,7 @@ discard block |
||
907 | 907 | |
908 | 908 | $html = (string) \preg_replace_callback( |
909 | 909 | '/(?<start>[^<]*)?(?<broken>(?:(?:<\/\w+(?:\s+\w+=\\"[^\"]+\\")*+)(?:[^<]+)>)+)(?<end>.*)/u', |
910 | - static function ($matches) { |
|
910 | + static function($matches) { |
|
911 | 911 | $matches['broken'] = \str_replace( |
912 | 912 | ['°lt/_simple_html_dom__voku_°', '°lt_simple_html_dom__voku_°', '°gt_simple_html_dom__voku_°'], |
913 | 913 | ['</', '<', '>'], |
@@ -915,9 +915,9 @@ discard block |
||
915 | 915 | ); |
916 | 916 | |
917 | 917 | self::$domBrokenReplaceHelper['orig'][] = $matches['broken']; |
918 | - self::$domBrokenReplaceHelper['tmp'][] = $matchesHash = self::$domHtmlBrokenHtmlHelper . \crc32($matches['broken']); |
|
918 | + self::$domBrokenReplaceHelper['tmp'][] = $matchesHash = self::$domHtmlBrokenHtmlHelper.\crc32($matches['broken']); |
|
919 | 919 | |
920 | - return $matches['start'] . $matchesHash . $matches['end']; |
|
920 | + return $matches['start'].$matchesHash.$matches['end']; |
|
921 | 921 | }, |
922 | 922 | $html |
923 | 923 | ); |
@@ -940,7 +940,7 @@ discard block |
||
940 | 940 | // regEx for e.g.: [<script id="elements-image-1" type="text/html">...</script>] |
941 | 941 | $html = (string) \preg_replace_callback( |
942 | 942 | '/(?<start>((?:<script) [^>]*type=(?:["\'])?(?:text\/html|text\/x-custom-template|text\/x-handlebars-template)+(?:[^>]*)>))(?<innerContent>.*)(?<end><\/script>)/isU', |
943 | - function ($matches) { |
|
943 | + function($matches) { |
|
944 | 944 | |
945 | 945 | // Check for logic in special script tags, like [<% _.each(tierPrices, function(item, key) { %>], |
946 | 946 | // because often this looks like non valid html in the template itself. |
@@ -950,18 +950,18 @@ discard block |
||
950 | 950 | $matches['innerContent'] = \str_replace('<\/', '</', $matches['innerContent']); |
951 | 951 | |
952 | 952 | self::$domBrokenReplaceHelper['orig'][] = $matches['innerContent']; |
953 | - self::$domBrokenReplaceHelper['tmp'][] = $matchesHash = '' . self::$domHtmlBrokenHtmlHelper . '' . \crc32($matches['innerContent']); |
|
953 | + self::$domBrokenReplaceHelper['tmp'][] = $matchesHash = ''.self::$domHtmlBrokenHtmlHelper.''.\crc32($matches['innerContent']); |
|
954 | 954 | |
955 | - return $matches['start'] . $matchesHash . $matches['end']; |
|
955 | + return $matches['start'].$matchesHash.$matches['end']; |
|
956 | 956 | } |
957 | 957 | } |
958 | 958 | |
959 | 959 | // remove the html5 fallback |
960 | 960 | $matches[0] = \str_replace('<\/', '</', $matches[0]); |
961 | 961 | |
962 | - $specialNonScript = '<' . self::$domHtmlSpecialScriptHelper . \substr($matches[0], \strlen('<script')); |
|
962 | + $specialNonScript = '<'.self::$domHtmlSpecialScriptHelper.\substr($matches[0], \strlen('<script')); |
|
963 | 963 | |
964 | - return \substr($specialNonScript, 0, -\strlen('</script>')) . '</' . self::$domHtmlSpecialScriptHelper . '>'; |
|
964 | + return \substr($specialNonScript, 0, -\strlen('</script>')).'</'.self::$domHtmlSpecialScriptHelper.'>'; |
|
965 | 965 | }, |
966 | 966 | $html |
967 | 967 | ); |