diff --git a/ext/xmlreader/php_xmlreader.stub.php b/ext/xmlreader/php_xmlreader.stub.php index 9932b56fc367a..4e902054d5f1e 100644 --- a/ext/xmlreader/php_xmlreader.stub.php +++ b/ext/xmlreader/php_xmlreader.stub.php @@ -33,77 +33,77 @@ class XMLReader public string $xmlLang; /** @return bool */ - public function close() {} + public function close() {} // TODO make the return type void - /** @return string|null */ - public function getAttribute(string $name) {} + /** @tentative-return-type */ + public function getAttribute(string $name): ?string {} - /** @return string|null */ - public function getAttributeNo(int $index) {} + /** @tentative-return-type */ + public function getAttributeNo(int $index): ?string {} - /** @return string|null */ - public function getAttributeNs(string $name, string $namespace) {} + /** @tentative-return-type */ + public function getAttributeNs(string $name, string $namespace): ?string {} - /** @return bool */ - public function getParserProperty(int $property) {} + /** @tentative-return-type */ + public function getParserProperty(int $property): bool {} - /** @return bool */ - public function isValid() {} + /** @tentative-return-type */ + public function isValid(): bool {} - /** @return string|null */ - public function lookupNamespace(string $prefix) {} + /** @tentative-return-type */ + public function lookupNamespace(string $prefix): ?string {} - /** @return bool */ - public function moveToAttribute(string $name) {} + /** @tentative-return-type */ + public function moveToAttribute(string $name): bool {} - /** @return bool */ - public function moveToAttributeNo(int $index) {} + /** @tentative-return-type */ + public function moveToAttributeNo(int $index): bool {} - /** @return bool */ - public function moveToAttributeNs(string $name, string $namespace) {} + /** @tentative-return-type */ + public function moveToAttributeNs(string $name, string $namespace): bool {} - /** @return bool */ - public function moveToElement() {} + /** @tentative-return-type */ + public function moveToElement(): bool {} - /** @return bool */ - public function moveToFirstAttribute() {} + /** @tentative-return-type */ + public function moveToFirstAttribute(): bool {} - /** @return bool */ - public function moveToNextAttribute() {} + /** @tentative-return-type */ + public function moveToNextAttribute(): bool {} - /** @return bool */ - public function read() {} + /** @tentative-return-type */ + public function read(): bool {} - /** @return bool */ - public function next(?string $name = null) {} + /** @tentative-return-type */ + public function next(?string $name = null): bool {} /** @return bool|XMLReader */ public static function open(string $uri, ?string $encoding = null, int $flags = 0) {} - /** @return string */ - public function readInnerXml() {} + /** @tentative-return-type */ + public function readInnerXml(): string {} - /** @return string */ - public function readOuterXml() {} + /** @tentative-return-type */ + public function readOuterXml(): string {} - /** @return string */ - public function readString() {} + /** @tentative-return-type */ + public function readString(): string {} - /** @return bool */ - public function setSchema(?string $filename) {} + /** @tentative-return-type */ + public function setSchema(?string $filename): bool {} - /** @return bool */ - public function setParserProperty(int $property, bool $value) {} + /** @tentative-return-type */ + public function setParserProperty(int $property, bool $value): bool {} - /** @return bool */ - public function setRelaxNGSchema(?string $filename) {} + /** @tentative-return-type */ + public function setRelaxNGSchema(?string $filename): bool {} - /** @return bool */ - public function setRelaxNGSchemaSource(?string $source) {} + /** @tentative-return-type */ + public function setRelaxNGSchemaSource(?string $source): bool {} /** @return bool|XMLReader */ public static function XML(string $source, ?string $encoding = null, int $flags = 0) {} - /** @return DOMNode|false */ - public function expand(?DOMNode $baseNode = null) {} + /** @tentative-return-type */ + public function expand(?DOMNode $baseNode = null): DOMNode|false {} } diff --git a/ext/xmlreader/php_xmlreader_arginfo.h b/ext/xmlreader/php_xmlreader_arginfo.h index 0ce3fd862f406..35779801e4aad 100644 --- a/ext/xmlreader/php_xmlreader_arginfo.h +++ b/ext/xmlreader/php_xmlreader_arginfo.h @@ -1,47 +1,55 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 49adb3008ade3f92f9b764ead9366efc6681e46f */ + * Stub hash: 0678d0de4ee5e1390055f588d1481eff8a530fc0 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_close, 0, 0, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_getAttribute, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLReader_getAttribute, 0, 1, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_getAttributeNo, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLReader_getAttributeNo, 0, 1, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_getAttributeNs, 0, 0, 2) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLReader_getAttributeNs, 0, 2, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, namespace, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_getParserProperty, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLReader_getParserProperty, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, property, IS_LONG, 0) ZEND_END_ARG_INFO() -#define arginfo_class_XMLReader_isValid arginfo_class_XMLReader_close +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLReader_isValid, 0, 0, _IS_BOOL, 0) +ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_lookupNamespace, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLReader_lookupNamespace, 0, 1, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 0) ZEND_END_ARG_INFO() -#define arginfo_class_XMLReader_moveToAttribute arginfo_class_XMLReader_getAttribute +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLReader_moveToAttribute, 0, 1, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) +ZEND_END_ARG_INFO() -#define arginfo_class_XMLReader_moveToAttributeNo arginfo_class_XMLReader_getAttributeNo +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLReader_moveToAttributeNo, 0, 1, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) +ZEND_END_ARG_INFO() -#define arginfo_class_XMLReader_moveToAttributeNs arginfo_class_XMLReader_getAttributeNs +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLReader_moveToAttributeNs, 0, 2, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, namespace, IS_STRING, 0) +ZEND_END_ARG_INFO() -#define arginfo_class_XMLReader_moveToElement arginfo_class_XMLReader_close +#define arginfo_class_XMLReader_moveToElement arginfo_class_XMLReader_isValid -#define arginfo_class_XMLReader_moveToFirstAttribute arginfo_class_XMLReader_close +#define arginfo_class_XMLReader_moveToFirstAttribute arginfo_class_XMLReader_isValid -#define arginfo_class_XMLReader_moveToNextAttribute arginfo_class_XMLReader_close +#define arginfo_class_XMLReader_moveToNextAttribute arginfo_class_XMLReader_isValid -#define arginfo_class_XMLReader_read arginfo_class_XMLReader_close +#define arginfo_class_XMLReader_read arginfo_class_XMLReader_isValid -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_next, 0, 0, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLReader_next, 0, 0, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 1, "null") ZEND_END_ARG_INFO() @@ -51,24 +59,25 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_open, 0, 0, 1) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() -#define arginfo_class_XMLReader_readInnerXml arginfo_class_XMLReader_close +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLReader_readInnerXml, 0, 0, IS_STRING, 0) +ZEND_END_ARG_INFO() -#define arginfo_class_XMLReader_readOuterXml arginfo_class_XMLReader_close +#define arginfo_class_XMLReader_readOuterXml arginfo_class_XMLReader_readInnerXml -#define arginfo_class_XMLReader_readString arginfo_class_XMLReader_close +#define arginfo_class_XMLReader_readString arginfo_class_XMLReader_readInnerXml -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_setSchema, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLReader_setSchema, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 1) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_setParserProperty, 0, 0, 2) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLReader_setParserProperty, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, property, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, value, _IS_BOOL, 0) ZEND_END_ARG_INFO() #define arginfo_class_XMLReader_setRelaxNGSchema arginfo_class_XMLReader_setSchema -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_setRelaxNGSchemaSource, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLReader_setRelaxNGSchemaSource, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 1) ZEND_END_ARG_INFO() @@ -78,7 +87,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_XML, 0, 0, 1) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLReader_expand, 0, 0, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_XMLReader_expand, 0, 0, DOMNode, MAY_BE_FALSE) ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, baseNode, DOMNode, 1, "null") ZEND_END_ARG_INFO() diff --git a/ext/xmlwriter/php_xmlwriter.stub.php b/ext/xmlwriter/php_xmlwriter.stub.php index ee90003399b03..7f3ff5be103aa 100644 --- a/ext/xmlwriter/php_xmlwriter.stub.php +++ b/ext/xmlwriter/php_xmlwriter.stub.php @@ -89,256 +89,256 @@ function xmlwriter_flush(XMLWriter $writer, bool $empty = true): string|int {} class XMLWriter { /** - * @return bool + * @tentative-return-type * @alias xmlwriter_open_uri * @no-verify Behaviour differs from the aliased function */ - public function openUri(string $uri) {} + public function openUri(string $uri): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_open_memory * @no-verify Behaviour differs from the aliased function */ - public function openMemory() {} + public function openMemory(): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_set_indent */ - public function setIndent(bool $enable) {} + public function setIndent(bool $enable): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_set_indent_string */ - public function setIndentString(string $indentation) {} + public function setIndentString(string $indentation): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_start_comment */ - public function startComment() {} + public function startComment(): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_end_comment */ - public function endComment() {} + public function endComment(): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_start_attribute */ - public function startAttribute(string $name) {} + public function startAttribute(string $name): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_end_attribute */ - public function endAttribute() {} + public function endAttribute(): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_write_attribute */ - public function writeAttribute(string $name, string $value) {} + public function writeAttribute(string $name, string $value): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_start_attribute_ns */ - public function startAttributeNs(?string $prefix, string $name, ?string $namespace) {} + public function startAttributeNs(?string $prefix, string $name, ?string $namespace): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_write_attribute_ns */ - public function writeAttributeNs(?string $prefix, string $name, ?string $namespace, string $value) {} + public function writeAttributeNs(?string $prefix, string $name, ?string $namespace, string $value): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_start_element */ - public function startElement(string $name) {} + public function startElement(string $name): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_end_element */ - public function endElement() {} + public function endElement(): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_full_end_element */ - public function fullEndElement() {} + public function fullEndElement(): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_start_element_ns */ - public function startElementNs(?string $prefix, string $name, ?string $namespace) {} + public function startElementNs(?string $prefix, string $name, ?string $namespace): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_write_element */ - public function writeElement(string $name, ?string $content = null) {} + public function writeElement(string $name, ?string $content = null): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_write_element_ns */ - public function writeElementNs(?string $prefix, string $name, ?string $namespace, ?string $content = null) {} + public function writeElementNs(?string $prefix, string $name, ?string $namespace, ?string $content = null): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_start_pi */ - public function startPi(string $target) {} + public function startPi(string $target): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_end_pi */ - public function endPi() {} + public function endPi(): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_write_pi */ - public function writePi(string $target, string $content) {} + public function writePi(string $target, string $content): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_start_cdata */ - public function startCdata() {} + public function startCdata(): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_end_cdata * */ - public function endCdata() {} + public function endCdata(): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_write_cdata */ - public function writeCdata(string $content) {} + public function writeCdata(string $content): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_text */ - public function text(string $content) {} + public function text(string $content): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_write_raw */ - public function writeRaw(string $content) {} + public function writeRaw(string $content): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_start_document */ - public function startDocument(?string $version = "1.0", ?string $encoding = null, ?string $standalone = null) {} + public function startDocument(?string $version = "1.0", ?string $encoding = null, ?string $standalone = null): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_end_document */ - public function endDocument() {} + public function endDocument(): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_write_comment */ - public function writeComment(string $content) {} + public function writeComment(string $content): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_start_dtd */ - public function startDtd(string $qualifiedName, ?string $publicId = null, ?string $systemId = null) {} + public function startDtd(string $qualifiedName, ?string $publicId = null, ?string $systemId = null): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_end_dtd */ - public function endDtd() {} + public function endDtd(): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_write_dtd */ - public function writeDtd(string $name, ?string $publicId = null, ?string $systemId = null, ?string $content = null) {} + public function writeDtd(string $name, ?string $publicId = null, ?string $systemId = null, ?string $content = null): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_start_dtd_element */ - public function startDtdElement(string $qualifiedName) {} + public function startDtdElement(string $qualifiedName): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_end_dtd_element */ - public function endDtdElement() {} + public function endDtdElement(): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_write_dtd_element */ - public function writeDtdElement(string $name, string $content) {} + public function writeDtdElement(string $name, string $content): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_start_dtd_attlist */ - public function startDtdAttlist(string $name) {} + public function startDtdAttlist(string $name): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_end_dtd_attlist */ - public function endDtdAttlist() {} + public function endDtdAttlist(): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_write_dtd_attlist */ - public function writeDtdAttlist(string $name, string $content) {} + public function writeDtdAttlist(string $name, string $content): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_start_dtd_entity */ - public function startDtdEntity(string $name, bool $isParam) {} + public function startDtdEntity(string $name, bool $isParam): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_end_dtd_entity */ - public function endDtdEntity() {} + public function endDtdEntity(): bool {} /** - * @return bool + * @tentative-return-type * @alias xmlwriter_write_dtd_entity */ - public function writeDtdEntity(string $name, string $content, bool $isParam = false, ?string $publicId = null, ?string $systemId = null, ?string $notationData = null) {} + public function writeDtdEntity(string $name, string $content, bool $isParam = false, ?string $publicId = null, ?string $systemId = null, ?string $notationData = null): bool {} /** - * @return string + * @tentative-return-type * @alias xmlwriter_output_memory */ - public function outputMemory(bool $flush = true) {} + public function outputMemory(bool $flush = true): string {} /** - * @return string|int + * @tentative-return-type * @alias xmlwriter_flush */ - public function flush(bool $empty = true) {} + public function flush(bool $empty = true): string|int {} } diff --git a/ext/xmlwriter/php_xmlwriter_arginfo.h b/ext/xmlwriter/php_xmlwriter_arginfo.h index 7547479b3bf8c..8c83c9497d187 100644 --- a/ext/xmlwriter/php_xmlwriter_arginfo.h +++ b/ext/xmlwriter/php_xmlwriter_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: ce5cf4f922e47833033729b2a8941c36fa2b4d6d */ + * Stub hash: 820ad2d68166b189b9163c2c3dfcc76806d41b7d */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_xmlwriter_open_uri, 0, 1, XMLWriter, MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 0) @@ -175,18 +175,18 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_xmlwriter_flush, 0, 1, MAY_BE_ST ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, empty, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_openUri, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_openUri, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_openMemory, 0, 0, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_openMemory, 0, 0, _IS_BOOL, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_setIndent, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_setIndent, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, enable, _IS_BOOL, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_setIndentString, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_setIndentString, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, indentation, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -194,24 +194,24 @@ ZEND_END_ARG_INFO() #define arginfo_class_XMLWriter_endComment arginfo_class_XMLWriter_openMemory -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_startAttribute, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_startAttribute, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_END_ARG_INFO() #define arginfo_class_XMLWriter_endAttribute arginfo_class_XMLWriter_openMemory -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_writeAttribute, 0, 0, 2) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_writeAttribute, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_startAttributeNs, 0, 0, 3) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_startAttributeNs, 0, 3, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, namespace, IS_STRING, 1) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_writeAttributeNs, 0, 0, 4) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_writeAttributeNs, 0, 4, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, namespace, IS_STRING, 1) @@ -226,25 +226,25 @@ ZEND_END_ARG_INFO() #define arginfo_class_XMLWriter_startElementNs arginfo_class_XMLWriter_startAttributeNs -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_writeElement, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_writeElement, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, content, IS_STRING, 1, "null") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_writeElementNs, 0, 0, 3) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_writeElementNs, 0, 3, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, namespace, IS_STRING, 1) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, content, IS_STRING, 1, "null") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_startPi, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_startPi, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, target, IS_STRING, 0) ZEND_END_ARG_INFO() #define arginfo_class_XMLWriter_endPi arginfo_class_XMLWriter_openMemory -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_writePi, 0, 0, 2) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_writePi, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, target, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -253,7 +253,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_XMLWriter_endCdata arginfo_class_XMLWriter_openMemory -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_writeCdata, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_writeCdata, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -261,7 +261,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_XMLWriter_writeRaw arginfo_class_XMLWriter_writeCdata -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_startDocument, 0, 0, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_startDocument, 0, 0, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, version, IS_STRING, 1, "\"1.0\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, encoding, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, standalone, IS_STRING, 1, "null") @@ -271,7 +271,7 @@ ZEND_END_ARG_INFO() #define arginfo_class_XMLWriter_writeComment arginfo_class_XMLWriter_writeCdata -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_startDtd, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_startDtd, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, qualifiedName, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, publicId, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, systemId, IS_STRING, 1, "null") @@ -279,20 +279,20 @@ ZEND_END_ARG_INFO() #define arginfo_class_XMLWriter_endDtd arginfo_class_XMLWriter_openMemory -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_writeDtd, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_writeDtd, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, publicId, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, systemId, IS_STRING, 1, "null") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, content, IS_STRING, 1, "null") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_startDtdElement, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_startDtdElement, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, qualifiedName, IS_STRING, 0) ZEND_END_ARG_INFO() #define arginfo_class_XMLWriter_endDtdElement arginfo_class_XMLWriter_openMemory -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_writeDtdElement, 0, 0, 2) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_writeDtdElement, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0) ZEND_END_ARG_INFO() @@ -303,14 +303,14 @@ ZEND_END_ARG_INFO() #define arginfo_class_XMLWriter_writeDtdAttlist arginfo_class_XMLWriter_writeDtdElement -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_startDtdEntity, 0, 0, 2) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_startDtdEntity, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, isParam, _IS_BOOL, 0) ZEND_END_ARG_INFO() #define arginfo_class_XMLWriter_endDtdEntity arginfo_class_XMLWriter_openMemory -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_writeDtdEntity, 0, 0, 2) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_writeDtdEntity, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, isParam, _IS_BOOL, 0, "false") @@ -319,11 +319,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_writeDtdEntity, 0, 0, 2) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, notationData, IS_STRING, 1, "null") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_outputMemory, 0, 0, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XMLWriter_outputMemory, 0, 0, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flush, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XMLWriter_flush, 0, 0, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_XMLWriter_flush, 0, 0, MAY_BE_STRING|MAY_BE_LONG) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, empty, _IS_BOOL, 0, "true") ZEND_END_ARG_INFO() diff --git a/ext/xsl/php_xsl.stub.php b/ext/xsl/php_xsl.stub.php index 6f52e5570e1e4..de350acfce80a 100644 --- a/ext/xsl/php_xsl.stub.php +++ b/ext/xsl/php_xsl.stub.php @@ -6,49 +6,49 @@ class XSLTProcessor { /** * @param DOMDocument|SimpleXMLElement $stylesheet - * @return bool + * @tentative-return-type */ - public function importStylesheet(object $stylesheet) {} + public function importStylesheet(object $stylesheet): bool {} /** * @param DOMDocument|SimpleXMLElement $document - * @return DOMDocument|false + * @tentative-return-type */ - public function transformToDoc(object $document, ?string $returnClass = null) {} + public function transformToDoc(object $document, ?string $returnClass = null): DOMDocument|false {} /** * @param DOMDocument|SimpleXMLElement $document - * @return int + * @tentative-return-type */ - public function transformToUri(object $document, string $uri) {} + public function transformToUri(object $document, string $uri): int {} /** * @param DOMDocument|SimpleXMLElement $document - * @return string|false|null + * @tentative-return-type */ - public function transformToXml(object $document) {} + public function transformToXml(object $document): string|null|false {} - /** @return bool */ - public function setParameter(string $namespace, array|string $name, ?string $value = null) {} + /** @tentative-return-type */ + public function setParameter(string $namespace, array|string $name, ?string $value = null): bool {} - /** @return string|false */ - public function getParameter(string $namespace, string $name) {} + /** @tentative-return-type */ + public function getParameter(string $namespace, string $name): string|false {} - /** @return bool */ - public function removeParameter(string $namespace, string $name) {} + /** @tentative-return-type */ + public function removeParameter(string $namespace, string $name): bool {} - /** @return bool */ - public function hasExsltSupport() {} + /** @tentative-return-type */ + public function hasExsltSupport(): bool {} - /** @return void */ - public function registerPHPFunctions(array|string|null $functions = null) {} + /** @tentative-return-type */ + public function registerPHPFunctions(array|string|null $functions = null): void {} /** @return bool */ - public function setProfiling(?string $filename) {} + public function setProfiling(?string $filename) {} // TODO make the return type void - /** @return int */ - public function setSecurityPrefs(int $preferences) {} + /** @tentative-return-type */ + public function setSecurityPrefs(int $preferences): int {} - /** @return int */ - public function getSecurityPrefs() {} + /** @tentative-return-type */ + public function getSecurityPrefs(): int {} } diff --git a/ext/xsl/php_xsl_arginfo.h b/ext/xsl/php_xsl_arginfo.h index f5be7aa731d29..11c96cdf062b6 100644 --- a/ext/xsl/php_xsl_arginfo.h +++ b/ext/xsl/php_xsl_arginfo.h @@ -1,41 +1,44 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: bcc89ca2603d60a9832704809fd8ab3834e79f74 */ + * Stub hash: 7c920913c15c9cd663f19f7ec5ad81648d6eddbc */ -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XSLTProcessor_importStylesheet, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XSLTProcessor_importStylesheet, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, stylesheet, IS_OBJECT, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XSLTProcessor_transformToDoc, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_TYPE_MASK_EX(arginfo_class_XSLTProcessor_transformToDoc, 0, 1, DOMDocument, MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, document, IS_OBJECT, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, returnClass, IS_STRING, 1, "null") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XSLTProcessor_transformToUri, 0, 0, 2) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XSLTProcessor_transformToUri, 0, 2, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, document, IS_OBJECT, 0) ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XSLTProcessor_transformToXml, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_XSLTProcessor_transformToXml, 0, 1, MAY_BE_STRING|MAY_BE_NULL|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, document, IS_OBJECT, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XSLTProcessor_setParameter, 0, 0, 2) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XSLTProcessor_setParameter, 0, 2, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, namespace, IS_STRING, 0) ZEND_ARG_TYPE_MASK(0, name, MAY_BE_ARRAY|MAY_BE_STRING, NULL) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 1, "null") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XSLTProcessor_getParameter, 0, 0, 2) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_XSLTProcessor_getParameter, 0, 2, MAY_BE_STRING|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, namespace, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_END_ARG_INFO() -#define arginfo_class_XSLTProcessor_removeParameter arginfo_class_XSLTProcessor_getParameter +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XSLTProcessor_removeParameter, 0, 2, _IS_BOOL, 0) + ZEND_ARG_TYPE_INFO(0, namespace, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) +ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XSLTProcessor_hasExsltSupport, 0, 0, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XSLTProcessor_hasExsltSupport, 0, 0, _IS_BOOL, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XSLTProcessor_registerPHPFunctions, 0, 0, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XSLTProcessor_registerPHPFunctions, 0, 0, IS_VOID, 0) ZEND_ARG_TYPE_MASK(0, functions, MAY_BE_ARRAY|MAY_BE_STRING|MAY_BE_NULL, "null") ZEND_END_ARG_INFO() @@ -43,11 +46,12 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XSLTProcessor_setProfiling, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 1) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_XSLTProcessor_setSecurityPrefs, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XSLTProcessor_setSecurityPrefs, 0, 1, IS_LONG, 0) ZEND_ARG_TYPE_INFO(0, preferences, IS_LONG, 0) ZEND_END_ARG_INFO() -#define arginfo_class_XSLTProcessor_getSecurityPrefs arginfo_class_XSLTProcessor_hasExsltSupport +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_XSLTProcessor_getSecurityPrefs, 0, 0, IS_LONG, 0) +ZEND_END_ARG_INFO() ZEND_METHOD(XSLTProcessor, importStylesheet);