From 3b665c5957ba96be0bf74c2a095c6872caecf3dc Mon Sep 17 00:00:00 2001 From: Dustin Wilson Date: Mon, 3 Jan 2022 12:04:29 -0600 Subject: [PATCH] Fix error in documentation --- README.md | 2 +- lib/Document.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 952a5da..cf30c2f 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ partial class Document extends Node implements \ArrayAccess { use DocumentOrElement, NonElementParentNode, ParentNode, XPathEvaluatorBase; public function __construct( - string $source = null, + ?string $source = null, ?string $charset = null ); diff --git a/lib/Document.php b/lib/Document.php index 2be5338..1491b3f 100644 --- a/lib/Document.php +++ b/lib/Document.php @@ -353,7 +353,7 @@ class Document extends Node implements \ArrayAccess { } - public function __construct(string $source = null, ?string $charset = null) { + public function __construct(?string $source = null, ?string $charset = null) { parent::__construct(new InnerDocument($this)); $this->_implementation = new DOMImplementation($this);