Fix phpdoc for DOMDocument load methods

Closes GH-13763.
This commit is contained in:
Vincent Langlet 2024-03-19 21:20:38 +01:00 committed by Niels Dossche
parent db063cb771
commit 741570c30f
3 changed files with 10 additions and 9 deletions

1
NEWS
View file

@ -9,6 +9,7 @@ PHP NEWS
- DOM: - DOM:
. Add some missing ZPP checks. (nielsdos) . Add some missing ZPP checks. (nielsdos)
. Fix potential memory leak in XPath evaluation results. (nielsdos) . Fix potential memory leak in XPath evaluation results. (nielsdos)
. Fix phpdoc for DOMDocument load methods. (VincentLanglet)
- GD: - GD:
. Fixed bug GH-12019 (add GDLIB_CFLAGS in feature tests). (Michael Orlitzky) . Fixed bug GH-12019 (add GDLIB_CFLAGS in feature tests). (Michael Orlitzky)

View file

@ -743,11 +743,11 @@ class DOMDocument extends DOMNode implements DOMParentNode
/** @return DOMNode|false */ /** @return DOMNode|false */
public function importNode(DOMNode $node, bool $deep = false) {} public function importNode(DOMNode $node, bool $deep = false) {}
/** @return DOMDocument|bool */ /** @return bool */
public function load(string $filename, int $options = 0) {} // TODO return type shouldn't depend on the call scope public function load(string $filename, int $options = 0) {}
/** @return DOMDocument|bool */ /** @return bool */
public function loadXML(string $source, int $options = 0) {} // TODO return type shouldn't depend on the call scope public function loadXML(string $source, int $options = 0) {}
/** @tentative-return-type */ /** @tentative-return-type */
public function normalizeDocument(): void {} public function normalizeDocument(): void {}
@ -759,11 +759,11 @@ class DOMDocument extends DOMNode implements DOMParentNode
public function save(string $filename, int $options = 0): int|false {} public function save(string $filename, int $options = 0): int|false {}
#ifdef LIBXML_HTML_ENABLED #ifdef LIBXML_HTML_ENABLED
/** @return DOMDocument|bool */ /** @return bool */
public function loadHTML(string $source, int $options = 0) {} // TODO return type shouldn't depend on the call scope public function loadHTML(string $source, int $options = 0) {}
/** @return DOMDocument|bool */ /** @return bool */
public function loadHTMLFile(string $filename, int $options = 0) {} // TODO return type shouldn't depend on the call scope public function loadHTMLFile(string $filename, int $options = 0) {}
/** @tentative-return-type */ /** @tentative-return-type */
public function saveHTML(?DOMNode $node = null): string|false {} public function saveHTML(?DOMNode $node = null): string|false {}

View file

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead. /* This is a generated file, edit the .stub.php file instead.
* Stub hash: 3f579ee4c3aef3bde54e9a50d23432f1bd782929 */ * Stub hash: 7d4dc9e1a3736f2ac9082c32bf5260dfa58b1aa0 */
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_dom_import_simplexml, 0, 1, DOMElement, 0) ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_dom_import_simplexml, 0, 1, DOMElement, 0)
ZEND_ARG_TYPE_INFO(0, node, IS_OBJECT, 0) ZEND_ARG_TYPE_INFO(0, node, IS_OBJECT, 0)