aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/league/html-to-markdown/src/Element.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-11-25 17:12:28 +0100
committerMario <mario@mariovavti.com>2023-11-25 17:12:28 +0100
commit0fd8e02a884a2b040dca62ab5d9674db5f6a070b (patch)
tree586ee43f32f6f14368c09026f21dcd3244ea24b6 /vendor/league/html-to-markdown/src/Element.php
parent82e704ec5b107823c09f1387e9091adee53a4c2d (diff)
parent55c4bfb67009c598f25b1a8189604bfffa73dfbb (diff)
downloadvolse-hubzilla-0fd8e02a884a2b040dca62ab5d9674db5f6a070b.tar.gz
volse-hubzilla-0fd8e02a884a2b040dca62ab5d9674db5f6a070b.tar.bz2
volse-hubzilla-0fd8e02a884a2b040dca62ab5d9674db5f6a070b.zip
Merge branch '8.8RC'8.8
Diffstat (limited to 'vendor/league/html-to-markdown/src/Element.php')
-rw-r--r--vendor/league/html-to-markdown/src/Element.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/vendor/league/html-to-markdown/src/Element.php b/vendor/league/html-to-markdown/src/Element.php
index 0515b5995..ef3ecfa9a 100644
--- a/vendor/league/html-to-markdown/src/Element.php
+++ b/vendor/league/html-to-markdown/src/Element.php
@@ -98,6 +98,8 @@ class Element implements ElementInterface
{
$ret = [];
foreach ($this->node->childNodes as $node) {
+ /** @psalm-suppress RedundantCondition */
+ \assert($node instanceof \DOMNode);
$ret[] = new self($node);
}
@@ -116,7 +118,7 @@ class Element implements ElementInterface
return $this->nextCached;
}
- private function getNextNode(\DomNode $node, bool $checkChildren = true): ?\DomNode
+ private function getNextNode(\DOMNode $node, bool $checkChildren = true): ?\DOMNode
{
if ($checkChildren && $node->firstChild) {
return $node->firstChild;
@@ -142,11 +144,7 @@ class Element implements ElementInterface
$tagNames = [$tagNames];
}
- for ($p = $this->node->parentNode; $p !== false; $p = $p->parentNode) {
- if ($p === null) {
- return false;
- }
-
+ for ($p = $this->node->parentNode; $p !== null; $p = $p->parentNode) {
if (\in_array($p->nodeName, $tagNames, true)) {
return true;
}