From f6fbe48c573917f09a093b55c49ea3fd24724151 Mon Sep 17 00:00:00 2001 From: Dustin Wilson Date: Sat, 25 Sep 2021 15:47:57 -0500 Subject: [PATCH] Return value on Parser::parse is now \DOMDocument --- .gitignore | 1 + lib/Parser.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 298e636..d85ae80 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # html5-parser specific manual node_modules +test*.html test*.php # General diff --git a/lib/Parser.php b/lib/Parser.php index 6bc9f28..1501b39 100644 --- a/lib/Parser.php +++ b/lib/Parser.php @@ -30,7 +30,7 @@ class Parser { self::XMLNS_NAMESPACE => "xmlns", ]; - public static function parse(string $data, ?\DOMDocument $document = null, ?string $encodingOrContentType = null, ?\DOMElement $fragmentContext = null, ?String $file = null): Document { + public static function parse(string $data, ?\DOMDocument $document = null, ?string $encodingOrContentType = null, ?\DOMElement $fragmentContext = null, ?String $file = null): \DOMDocument { // Initialize the various classes needed for parsing $document = $document ?? new \DOMDocument; if ((error_reporting() & \E_USER_WARNING)) {