Skip to content

Commit 741570c

Browse files
VincentLangletnielsdos
authored andcommitted
Fix phpdoc for DOMDocument load methods
Closes GH-13763.
1 parent db063cb commit 741570c

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ PHP NEWS
99
- DOM:
1010
. Add some missing ZPP checks. (nielsdos)
1111
. Fix potential memory leak in XPath evaluation results. (nielsdos)
12+
. Fix phpdoc for DOMDocument load methods. (VincentLanglet)
1213

1314
- GD:
1415
. Fixed bug GH-12019 (add GDLIB_CFLAGS in feature tests). (Michael Orlitzky)

ext/dom/php_dom.stub.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -743,11 +743,11 @@ public function getElementsByTagNameNS(?string $namespace, string $localName): D
743743
/** @return DOMNode|false */
744744
public function importNode(DOMNode $node, bool $deep = false) {}
745745

746-
/** @return DOMDocument|bool */
747-
public function load(string $filename, int $options = 0) {} // TODO return type shouldn't depend on the call scope
746+
/** @return bool */
747+
public function load(string $filename, int $options = 0) {}
748748

749-
/** @return DOMDocument|bool */
750-
public function loadXML(string $source, int $options = 0) {} // TODO return type shouldn't depend on the call scope
749+
/** @return bool */
750+
public function loadXML(string $source, int $options = 0) {}
751751

752752
/** @tentative-return-type */
753753
public function normalizeDocument(): void {}
@@ -759,11 +759,11 @@ public function registerNodeClass(string $baseClass, ?string $extendedClass): bo
759759
public function save(string $filename, int $options = 0): int|false {}
760760

761761
#ifdef LIBXML_HTML_ENABLED
762-
/** @return DOMDocument|bool */
763-
public function loadHTML(string $source, int $options = 0) {} // TODO return type shouldn't depend on the call scope
762+
/** @return bool */
763+
public function loadHTML(string $source, int $options = 0) {}
764764

765-
/** @return DOMDocument|bool */
766-
public function loadHTMLFile(string $filename, int $options = 0) {} // TODO return type shouldn't depend on the call scope
765+
/** @return bool */
766+
public function loadHTMLFile(string $filename, int $options = 0) {}
767767

768768
/** @tentative-return-type */
769769
public function saveHTML(?DOMNode $node = null): string|false {}

ext/dom/php_dom_arginfo.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)