diff options
author | Mario <mario@mariovavti.com> | 2022-10-12 09:09:55 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-10-12 09:09:55 +0000 |
commit | d3856caf81c96b1ea2615a375122ca85e91a6fb3 (patch) | |
tree | 9e506b96668b45e1ced0a2ec701007a17e277d7a /vendor/michelf/php-markdown/test | |
parent | e1f9b1c47d8f3ed3400465ec279e894a0d9255c5 (diff) | |
download | volse-hubzilla-d3856caf81c96b1ea2615a375122ca85e91a6fb3.tar.gz volse-hubzilla-d3856caf81c96b1ea2615a375122ca85e91a6fb3.tar.bz2 volse-hubzilla-d3856caf81c96b1ea2615a375122ca85e91a6fb3.zip |
composer update michelf/php-markdown
Diffstat (limited to 'vendor/michelf/php-markdown/test')
-rw-r--r-- | vendor/michelf/php-markdown/test/helpers/MarkdownTestHelper.php | 11 | ||||
-rw-r--r-- | vendor/michelf/php-markdown/test/phpstan.neon | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/vendor/michelf/php-markdown/test/helpers/MarkdownTestHelper.php b/vendor/michelf/php-markdown/test/helpers/MarkdownTestHelper.php index ffca0c969..fc746366c 100644 --- a/vendor/michelf/php-markdown/test/helpers/MarkdownTestHelper.php +++ b/vendor/michelf/php-markdown/test/helpers/MarkdownTestHelper.php @@ -22,7 +22,6 @@ class MarkdownTestHelper $dataValues = array(); - /** @var SplFileInfo $inputFile */ foreach ($regexIterator as $inputFiles) { foreach ($inputFiles as $inputMarkdownPath) { $xhtml = true; @@ -163,6 +162,7 @@ class MarkdownTestHelper foreach ($node_list as $node) { switch ($node->nodeType) { case XML_ELEMENT_NODE: + /** @var DOMElement $node */ static::normalizeElementContent($node, $whitespace_preserve); static::normalizeElementAttributes($node); @@ -207,6 +207,7 @@ class MarkdownTestHelper break; case XML_TEXT_NODE: + /** @var DOMText $node */ if (!$whitespace_preserve) { if (trim($node->data) === "") { $node->data = $whitespace; @@ -222,8 +223,8 @@ class MarkdownTestHelper ($whitespace === "\n\n" || $whitespace === "\n")) { if ($element->firstChild) { if ($element->firstChild->nodeType == XML_TEXT_NODE) { - $element->firstChild->data = - preg_replace('{^\s+}', "\n", $element->firstChild->data); + $element->firstChild->data = // @phpstan-ignore-line + preg_replace('{^\s+}', "\n", $element->firstChild->data ?? ''); } else { $element->insertBefore(new DOMText("\n"), $element->firstChild); @@ -231,8 +232,8 @@ class MarkdownTestHelper } if ($element->lastChild) { if ($element->lastChild->nodeType == XML_TEXT_NODE) { - $element->lastChild->data = - preg_replace('{\s+$}', "\n", $element->lastChild->data); + $element->lastChild->data = // @phpstan-ignore-line + preg_replace('{\s+$}', "\n", $element->lastChild->data ?? ''); } else { $element->insertBefore(new DOMText("\n"), null); diff --git a/vendor/michelf/php-markdown/test/phpstan.neon b/vendor/michelf/php-markdown/test/phpstan.neon new file mode 100644 index 000000000..e385cc80d --- /dev/null +++ b/vendor/michelf/php-markdown/test/phpstan.neon @@ -0,0 +1,2 @@ +includes: + - ../vendor/phpstan/phpstan-phpunit/extension.neon |