From 86b731f38fa61c990cee4b9aacea8d34a294f9c7 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Mon, 4 Sep 2023 15:55:16 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/voku/helper/AbstractDomParser.php | 1 - src/voku/helper/HtmlDomHelper.php | 1 - src/voku/helper/HtmlDomParser.php | 2 -- src/voku/helper/SimpleHtmlDom.php | 1 - src/voku/helper/XmlDomParser.php | 1 - tests/HtmlDomParserTest.php | 2 +- tests/XmlDomParserTest.php | 3 ++- 7 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/voku/helper/AbstractDomParser.php b/src/voku/helper/AbstractDomParser.php index 66a4268..7ec93bd 100644 --- a/src/voku/helper/AbstractDomParser.php +++ b/src/voku/helper/AbstractDomParser.php @@ -497,7 +497,6 @@ public static function replaceToPreserveHtmlEntities(string $html): string $linksOld = []; if (\strpos($html, 'http') !== false) { - // regEx for e.g.: [https://www.domain.de/foo.php?foobar=1&email=lars%40moelleken.org&guid=test1233312&{{foo}}#foo] $regExUrl = '/(\[?\bhttps?:\/\/[^\s<>]+(?:\(\w+\)|[^[:punct:]\s]|\/|}|]))/i'; \preg_match_all($regExUrl, $html, $linksOld); diff --git a/src/voku/helper/HtmlDomHelper.php b/src/voku/helper/HtmlDomHelper.php index d17752a..d0454d8 100644 --- a/src/voku/helper/HtmlDomHelper.php +++ b/src/voku/helper/HtmlDomHelper.php @@ -6,7 +6,6 @@ final class HtmlDomHelper { - /** * @param string $html * @param string $optionStr diff --git a/src/voku/helper/HtmlDomParser.php b/src/voku/helper/HtmlDomParser.php index 6639f55..65ce7af 100644 --- a/src/voku/helper/HtmlDomParser.php +++ b/src/voku/helper/HtmlDomParser.php @@ -478,7 +478,6 @@ protected function createDOMDocument(string $html, $libXMLExtraOptions = null, $ } if ($documentFound === false) { - // UTF-8 hack: http://php.net/manual/en/domdocument.loadhtml.php#95251 $xmlHackUsed = false; if (\stripos('(