diff --git a/ext/xsl/php_xsl.stub.php b/ext/xsl/php_xsl.stub.php index 6f52e5570e1..de350acfce8 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 {} + + /** @tentative-return-type */ + public function setParameter(string $namespace, array|string $name, ?string $value = null): bool {} + + /** @tentative-return-type */ + public function getParameter(string $namespace, string $name): string|false {} + + /** @tentative-return-type */ + public function removeParameter(string $namespace, string $name): bool {} + + /** @tentative-return-type */ + public function hasExsltSupport(): bool {} + + /** @tentative-return-type */ + public function registerPHPFunctions(array|string|null $functions = null): void {} /** @return bool */ - public function setParameter(string $namespace, array|string $name, ?string $value = null) {} + public function setProfiling(?string $filename) {} // TODO make the return type void - /** @return string|false */ - public function getParameter(string $namespace, string $name) {} + /** @tentative-return-type */ + public function setSecurityPrefs(int $preferences): int {} - /** @return bool */ - public function removeParameter(string $namespace, string $name) {} - - /** @return bool */ - public function hasExsltSupport() {} - - /** @return void */ - public function registerPHPFunctions(array|string|null $functions = null) {} - - /** @return bool */ - public function setProfiling(?string $filename) {} - - /** @return int */ - public function setSecurityPrefs(int $preferences) {} - - /** @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 f5be7aa731d..11c96cdf062 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_INFO_EX(arginfo_class_XSLTProcessor_hasExsltSupport, 0, 0, 0) +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_registerPHPFunctions, 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_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);