From 044e252d195be7fb9c523e5ab7e5f37eae7f03fd Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 5 Oct 2023 11:35:02 +0000 Subject: composer update html to markdown --- vendor/league/html-to-markdown/src/Element.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'vendor/league/html-to-markdown/src/Element.php') 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; } -- cgit v1.2.3