From a06c45cca23fd22c4f0fba80ca83aad880cf1275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 18 May 2021 09:39:47 +0200 Subject: [PATCH] Declare tentative return types for ext/soap --- ext/soap/soap.stub.php | 84 ++++++++++++++--------------- ext/soap/soap_arginfo.h | 44 +++++++-------- ext/soap/tests/any.phpt | 2 +- ext/soap/tests/bug47021.phpt | 2 +- ext/soap/tests/bug69668.phpt | 2 +- ext/soap/tests/bug70875.phpt | 2 +- ext/soap/tests/bug71711.phpt | 2 +- ext/soap/tests/bug71996.phpt | 2 +- ext/soap/tests/bug77410.phpt | 2 +- ext/soap/tests/bugs/bug28969.phpt | 2 +- ext/soap/tests/bugs/bug29795.phpt | 2 +- ext/soap/tests/bugs/bug29839.phpt | 2 +- ext/soap/tests/bugs/bug29844.phpt | 2 +- ext/soap/tests/bugs/bug30045.phpt | 2 +- ext/soap/tests/bugs/bug30106.phpt | 2 +- ext/soap/tests/bugs/bug30175.phpt | 2 +- ext/soap/tests/bugs/bug30928.phpt | 2 +- ext/soap/tests/bugs/bug31695.phpt | 2 +- ext/soap/tests/bugs/bug32776.phpt | 2 +- ext/soap/tests/bugs/bug32941.phpt | 2 +- ext/soap/tests/bugs/bug34449.phpt | 2 +- ext/soap/tests/bugs/bug34453.phpt | 2 +- ext/soap/tests/bugs/bug34643.phpt | 2 +- ext/soap/tests/bugs/bug35142.phpt | 2 +- ext/soap/tests/bugs/bug35273.phpt | 2 +- ext/soap/tests/bugs/bug36226-2.phpt | 2 +- ext/soap/tests/bugs/bug36226.phpt | 2 +- ext/soap/tests/bugs/bug36999.phpt | 2 +- ext/soap/tests/bugs/bug37083.phpt | 2 +- ext/soap/tests/bugs/bug38004.phpt | 2 +- ext/soap/tests/bugs/bug38005.phpt | 2 +- ext/soap/tests/bugs/bug38055.phpt | 2 +- ext/soap/tests/bugs/bug38067.phpt | 2 +- ext/soap/tests/bugs/bug38536.phpt | 2 +- ext/soap/tests/bugs/bug39121.phpt | 2 +- ext/soap/tests/bugs/bug39815.phpt | 2 +- ext/soap/tests/bugs/bug42692.phpt | 2 +- ext/soap/tests/bugs/bug43045.phpt | 2 +- ext/soap/tests/bugs/bug44882.phpt | 2 +- ext/soap/tests/bugs/bug46419.phpt | 2 +- ext/soap/tests/bugs/bug50675.phpt | 2 +- ext/soap/tests/bugs/bug50762.phpt | 2 +- ext/soap/tests/bugs/bug54911.phpt | 2 +- ext/soap/tests/bugs/bug55323.phpt | 2 +- ext/soap/tests/bugs/bug73237.phpt | 2 +- ext/soap/tests/classmap002.phpt | 2 +- ext/soap/tests/classmap003.phpt | 2 +- ext/soap/tests/classmap004.phpt | 2 +- ext/soap/tests/transport001.phpt | 2 +- ext/soap/tests/typemap003.phpt | 2 +- ext/soap/tests/typemap004.phpt | 2 +- ext/soap/tests/typemap007.phpt | 2 +- ext/soap/tests/typemap008.phpt | 2 +- ext/soap/tests/typemap011.phpt | 2 +- ext/soap/tests/typemap012.phpt | 2 +- 55 files changed, 118 insertions(+), 116 deletions(-) diff --git a/ext/soap/soap.stub.php b/ext/soap/soap.stub.php index 1e92dca751190..faf068c74fab7 100644 --- a/ext/soap/soap.stub.php +++ b/ext/soap/soap.stub.php @@ -32,81 +32,81 @@ class SoapServer { public function __construct(?string $wsdl, array $options = []) {} - /** @return void */ - public function fault(string $code, string $string, string $actor = "", mixed $details = null, string $name = "") {} + /** @tentative-return-type */ + public function fault(string $code, string $string, string $actor = "", mixed $details = null, string $name = ""): void {} - /** @return void */ - public function addSoapHeader(SoapHeader $header) {} + /** @tentative-return-type */ + public function addSoapHeader(SoapHeader $header): void {} - /** @return void */ - public function setPersistence(int $mode) {} + /** @tentative-return-type */ + public function setPersistence(int $mode): void {} - /** @return void */ - public function setClass(string $class, mixed ...$args) {} + /** @tentative-return-type */ + public function setClass(string $class, mixed ...$args): void {} - /** @return void */ - public function setObject(object $object) {} + /** @tentative-return-type */ + public function setObject(object $object): void {} - /** @return array */ - public function getFunctions() {} + /** @tentative-return-type */ + public function getFunctions(): array {} /** * @param array|string|int $functions - * @return void + * @tentative-return-type */ - public function addFunction($functions) {} + public function addFunction($functions): void {} - /** @return void */ - public function handle(?string $request = null) {} + /** @tentative-return-type */ + public function handle(?string $request = null): void {} } class SoapClient { public function __construct(?string $wsdl, array $options = []) {} - /** @return mixed */ - public function __call(string $name, array $args) {} + /** @tentative-return-type */ + public function __call(string $name, array $args): mixed {} /** * @param SoapHeader|array|null $inputHeaders * @param array $outputHeaders - * @return mixed + * @tentative-return-type */ - public function __soapCall(string $name, array $args, ?array $options = null, $inputHeaders = null, &$outputHeaders = null) {} + public function __soapCall(string $name, array $args, ?array $options = null, $inputHeaders = null, &$outputHeaders = null): mixed {} - /** @return array|null */ - public function __getFunctions() {} + /** @tentative-return-type */ + public function __getFunctions(): ?array {} - /** @return array|null */ - public function __getTypes() {} + /** @tentative-return-type */ + public function __getTypes(): ?array {} - /** @return string|null */ - public function __getLastRequest() {} + /** @tentative-return-type */ + public function __getLastRequest(): ?string {} - /** @return string|null */ - public function __getLastResponse() {} + /** @tentative-return-type */ + public function __getLastResponse(): ?string {} - /** @return string|null */ - public function __getLastRequestHeaders() {} + /** @tentative-return-type */ + public function __getLastRequestHeaders(): ?string {} - /** @return string|null */ - public function __getLastResponseHeaders() {} + /** @tentative-return-type */ + public function __getLastResponseHeaders(): ?string {} - /** @return string|null */ - public function __doRequest(string $request, string $location, string $action, int $version, bool $oneWay = false) {} + /** @tentative-return-type */ + public function __doRequest(string $request, string $location, string $action, int $version, bool $oneWay = false): ?string {} - /** @return void */ - public function __setCookie(string $name, ?string $value = null) {} + /** @tentative-return-type */ + public function __setCookie(string $name, ?string $value = null): void {} - /** @return array */ - public function __getCookies() {} + /** @tentative-return-type */ + public function __getCookies(): array {} /** * @param SoapHeader|array|null $headers - * @return bool + * @tentative-return-type */ - public function __setSoapHeaders($headers = null) {} + public function __setSoapHeaders($headers = null): bool {} - /** @return string|null */ - public function __setLocation(?string $location = null) {} + /** @tentative-return-type */ + public function __setLocation(?string $location = null): ?string {} } diff --git a/ext/soap/soap_arginfo.h b/ext/soap/soap_arginfo.h index e656a15cbe992..6b6c4dcaf72bb 100644 --- a/ext/soap/soap_arginfo.h +++ b/ext/soap/soap_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: b4f2354707bc7b992a3574f820edb329b16dd49e */ + * Stub hash: c72f989c179f1bc136fe008c78ac3605efe55141 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_use_soap_error_handler, 0, 0, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enable, _IS_BOOL, 0, "true") @@ -48,7 +48,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapServer___construct, 0, 0, 1) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "[]") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapServer_fault, 0, 0, 2) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SoapServer_fault, 0, 2, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, code, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, actor, IS_STRING, 0, "\"\"") @@ -56,42 +56,42 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapServer_fault, 0, 0, 2) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 0, "\"\"") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapServer_addSoapHeader, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SoapServer_addSoapHeader, 0, 1, IS_VOID, 0) ZEND_ARG_OBJ_INFO(0, header, SoapHeader, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapServer_setPersistence, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SoapServer_setPersistence, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, mode, IS_LONG, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapServer_setClass, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SoapServer_setClass, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, class, IS_STRING, 0) ZEND_ARG_VARIADIC_TYPE_INFO(0, args, IS_MIXED, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapServer_setObject, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SoapServer_setObject, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, object, IS_OBJECT, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapServer_getFunctions, 0, 0, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SoapServer_getFunctions, 0, 0, IS_ARRAY, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapServer_addFunction, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SoapServer_addFunction, 0, 1, IS_VOID, 0) ZEND_ARG_INFO(0, functions) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapServer_handle, 0, 0, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SoapServer_handle, 0, 0, IS_VOID, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, request, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #define arginfo_class_SoapClient___construct arginfo_class_SoapServer___construct -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapClient___call, 0, 0, 2) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SoapClient___call, 0, 2, IS_MIXED, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, args, IS_ARRAY, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapClient___soapCall, 0, 0, 2) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SoapClient___soapCall, 0, 2, IS_MIXED, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, args, IS_ARRAY, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 1, "null") @@ -99,19 +99,21 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapClient___soapCall, 0, 0, 2) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, outputHeaders, "null") ZEND_END_ARG_INFO() -#define arginfo_class_SoapClient___getFunctions arginfo_class_SoapServer_getFunctions +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SoapClient___getFunctions, 0, 0, IS_ARRAY, 1) +ZEND_END_ARG_INFO() -#define arginfo_class_SoapClient___getTypes arginfo_class_SoapServer_getFunctions +#define arginfo_class_SoapClient___getTypes arginfo_class_SoapClient___getFunctions -#define arginfo_class_SoapClient___getLastRequest arginfo_class_SoapServer_getFunctions +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SoapClient___getLastRequest, 0, 0, IS_STRING, 1) +ZEND_END_ARG_INFO() -#define arginfo_class_SoapClient___getLastResponse arginfo_class_SoapServer_getFunctions +#define arginfo_class_SoapClient___getLastResponse arginfo_class_SoapClient___getLastRequest -#define arginfo_class_SoapClient___getLastRequestHeaders arginfo_class_SoapServer_getFunctions +#define arginfo_class_SoapClient___getLastRequestHeaders arginfo_class_SoapClient___getLastRequest -#define arginfo_class_SoapClient___getLastResponseHeaders arginfo_class_SoapServer_getFunctions +#define arginfo_class_SoapClient___getLastResponseHeaders arginfo_class_SoapClient___getLastRequest -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapClient___doRequest, 0, 0, 4) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SoapClient___doRequest, 0, 4, IS_STRING, 1) ZEND_ARG_TYPE_INFO(0, request, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, location, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, action, IS_STRING, 0) @@ -119,18 +121,18 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapClient___doRequest, 0, 0, 4) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, oneWay, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapClient___setCookie, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SoapClient___setCookie, 0, 1, IS_VOID, 0) ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 1, "null") ZEND_END_ARG_INFO() #define arginfo_class_SoapClient___getCookies arginfo_class_SoapServer_getFunctions -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapClient___setSoapHeaders, 0, 0, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SoapClient___setSoapHeaders, 0, 0, _IS_BOOL, 0) ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, headers, "null") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapClient___setLocation, 0, 0, 0) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SoapClient___setLocation, 0, 0, IS_STRING, 1) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, location, IS_STRING, 1, "null") ZEND_END_ARG_INFO() diff --git a/ext/soap/tests/any.phpt b/ext/soap/tests/any.phpt index 489c6c8872c01..859cf3bdfb6e6 100644 --- a/ext/soap/tests/any.phpt +++ b/ext/soap/tests/any.phpt @@ -35,7 +35,7 @@ class TestSoapClient extends SoapClient { $this->server->addFunction('echoAnyElement'); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { ob_start(); $this->server->handle($request); $response = ob_get_contents(); diff --git a/ext/soap/tests/bug47021.phpt b/ext/soap/tests/bug47021.phpt index d3bd9dfdd695b..ffe899cfca6d8 100644 --- a/ext/soap/tests/bug47021.phpt +++ b/ext/soap/tests/bug47021.phpt @@ -56,7 +56,7 @@ $options = [ class BugSoapClient extends SoapClient { - public function __doRequest($request, $location, $action, $version, $one_way = null) + public function __doRequest($request, $location, $action, $version, $one_way = null): ?string { $response = parent::__doRequest($request, $location, $action, $version, $one_way); diff --git a/ext/soap/tests/bug69668.phpt b/ext/soap/tests/bug69668.phpt index 88785ca799370..bf7e4c5ffa2a0 100644 --- a/ext/soap/tests/bug69668.phpt +++ b/ext/soap/tests/bug69668.phpt @@ -5,7 +5,7 @@ soap --FILE-- '', 'uri' => 'http://example.org']) extends SoapClient { - public function __doRequest($request, $location, $action, $version, $one_way = 0) { + public function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { echo $request; return ''; } diff --git a/ext/soap/tests/bug71996.phpt b/ext/soap/tests/bug71996.phpt index 5924aa2dfad24..18fb3fb180e65 100644 --- a/ext/soap/tests/bug71996.phpt +++ b/ext/soap/tests/bug71996.phpt @@ -6,7 +6,7 @@ soap '', 'uri' => 'http://example.org']) extends SoapClient { - public function __doRequest($request, $location, $action, $version, $one_way = 0) { + public function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { echo $request, "\n"; return ''; } diff --git a/ext/soap/tests/bug77410.phpt b/ext/soap/tests/bug77410.phpt index 5319a8f417355..645558f2ab87a 100644 --- a/ext/soap/tests/bug77410.phpt +++ b/ext/soap/tests/bug77410.phpt @@ -9,7 +9,7 @@ $client = new class(__DIR__ . '/bug77410.wsdl', [ 'cache_wsdl' => WSDL_CACHE_NONE, 'trace' => 1, ]) extends SoapClient { - public function __doRequest($request, $location, $action, $version, $one_way = 0) { + public function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { echo $request, "\n"; return ''; } diff --git a/ext/soap/tests/bugs/bug28969.phpt b/ext/soap/tests/bugs/bug28969.phpt index 37c81cac78bcb..dff895017ab30 100644 --- a/ext/soap/tests/bugs/bug28969.phpt +++ b/ext/soap/tests/bugs/bug28969.phpt @@ -17,7 +17,7 @@ class LocalSoapClient extends SoapClient { $this->server->addFunction('test'); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { ob_start(); $this->server->handle($request); $response = ob_get_contents(); diff --git a/ext/soap/tests/bugs/bug29795.phpt b/ext/soap/tests/bugs/bug29795.phpt index 109bc37f5ab6a..f21e61ca2fd01 100644 --- a/ext/soap/tests/bugs/bug29795.phpt +++ b/ext/soap/tests/bugs/bug29795.phpt @@ -12,7 +12,7 @@ class LocalSoapClient extends SoapClient { parent::__construct($wsdl, $options); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { return <<server->addFunction('EchoString'); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { ob_start(); $this->server->handle($request); $response = ob_get_contents(); diff --git a/ext/soap/tests/bugs/bug29844.phpt b/ext/soap/tests/bugs/bug29844.phpt index 87faf9fc69879..7b403374158e7 100644 --- a/ext/soap/tests/bugs/bug29844.phpt +++ b/ext/soap/tests/bugs/bug29844.phpt @@ -21,7 +21,7 @@ class LocalSoapClient extends SoapClient { $this->server->setClass('hello_world'); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { ob_start(); $this->server->handle($request); $response = ob_get_contents(); diff --git a/ext/soap/tests/bugs/bug30045.phpt b/ext/soap/tests/bugs/bug30045.phpt index 3c2a0b85865a6..debb613fc9e4d 100644 --- a/ext/soap/tests/bugs/bug30045.phpt +++ b/ext/soap/tests/bugs/bug30045.phpt @@ -20,7 +20,7 @@ class LocalSoapClient extends SoapClient { $this->server->addFunction('foo'); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { $xml = simplexml_load_string($request); echo $xml->children("http://schemas.xmlsoap.org/soap/envelope/")->Body->children("http://test-uri")->children()->param1->asXML(),"\n"; unset($xml); diff --git a/ext/soap/tests/bugs/bug30106.phpt b/ext/soap/tests/bugs/bug30106.phpt index 40f2fa173ad1e..023bd44272861 100644 --- a/ext/soap/tests/bugs/bug30106.phpt +++ b/ext/soap/tests/bugs/bug30106.phpt @@ -19,7 +19,7 @@ class LocalSoapClient extends SoapClient { $this->server->addFunction("getContinentList"); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { echo $request; ob_start(); $this->server->handle($request); diff --git a/ext/soap/tests/bugs/bug30175.phpt b/ext/soap/tests/bugs/bug30175.phpt index 396d554def471..98e4bf30f3164 100644 --- a/ext/soap/tests/bugs/bug30175.phpt +++ b/ext/soap/tests/bugs/bug30175.phpt @@ -9,7 +9,7 @@ soap.wsdl_cache_enabled=0 class LocalSoapClient extends SoapClient { - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { return << server->addFunction('test'); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { ob_start(); $this->server->handle($request); $response = ob_get_contents(); diff --git a/ext/soap/tests/bugs/bug31695.phpt b/ext/soap/tests/bugs/bug31695.phpt index 62345827eabb3..3ea026415097c 100644 --- a/ext/soap/tests/bugs/bug31695.phpt +++ b/ext/soap/tests/bugs/bug31695.phpt @@ -17,7 +17,7 @@ class LocalSoapClient extends SoapClient { $this->server->addFunction("Test"); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { echo "$location\n"; ob_start(); $this->server->handle($request); diff --git a/ext/soap/tests/bugs/bug32776.phpt b/ext/soap/tests/bugs/bug32776.phpt index 257cb50e992c0..245ea224f9051 100644 --- a/ext/soap/tests/bugs/bug32776.phpt +++ b/ext/soap/tests/bugs/bug32776.phpt @@ -22,7 +22,7 @@ class LocalSoapClient extends SoapClient { $this->server->addFunction('test'); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { ob_start(); $this->server->handle($request); $response = ob_get_contents(); diff --git a/ext/soap/tests/bugs/bug32941.phpt b/ext/soap/tests/bugs/bug32941.phpt index dda282edfc780..6c1d5b2cb6174 100644 --- a/ext/soap/tests/bugs/bug32941.phpt +++ b/ext/soap/tests/bugs/bug32941.phpt @@ -5,7 +5,7 @@ soap --FILE-- server->addFunction('EchoString'); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { ob_start(); $this->server->handle($request); $response = ob_get_contents(); diff --git a/ext/soap/tests/bugs/bug34643.phpt b/ext/soap/tests/bugs/bug34643.phpt index 651027b1b17a1..c33b1336cfc3a 100644 --- a/ext/soap/tests/bugs/bug34643.phpt +++ b/ext/soap/tests/bugs/bug34643.phpt @@ -22,7 +22,7 @@ class LocalSoapClient extends SoapClient { $this->server->setClass('fp'); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { ob_start(); $this->server->handle($request); $response = ob_get_contents(); diff --git a/ext/soap/tests/bugs/bug35142.phpt b/ext/soap/tests/bugs/bug35142.phpt index 9bc4e308701dd..fea08d33c5800 100644 --- a/ext/soap/tests/bugs/bug35142.phpt +++ b/ext/soap/tests/bugs/bug35142.phpt @@ -24,7 +24,7 @@ class TestSoapClient extends SoapClient { $this->server->addFunction('PostEvents'); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { echo "$request\n"; $this->server->handle($request); return $response; diff --git a/ext/soap/tests/bugs/bug35273.phpt b/ext/soap/tests/bugs/bug35273.phpt index c2839ed793b0e..11d8a024fa873 100644 --- a/ext/soap/tests/bugs/bug35273.phpt +++ b/ext/soap/tests/bugs/bug35273.phpt @@ -7,7 +7,7 @@ soap.wsdl_cache_enabled=0 --FILE-- server->addFunction('PostEvents'); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { echo "$request\n"; $this->server->handle($request); return $response; diff --git a/ext/soap/tests/bugs/bug36226.phpt b/ext/soap/tests/bugs/bug36226.phpt index eec034438c8fb..a0eac843a21df 100644 --- a/ext/soap/tests/bugs/bug36226.phpt +++ b/ext/soap/tests/bugs/bug36226.phpt @@ -24,7 +24,7 @@ class TestSoapClient extends SoapClient { $this->server->addFunction('PostEvents'); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { echo "$request\n"; $this->server->handle($request); return $response; diff --git a/ext/soap/tests/bugs/bug36999.phpt b/ext/soap/tests/bugs/bug36999.phpt index 150cdad6a1504..3bb5561fa67ad 100644 --- a/ext/soap/tests/bugs/bug36999.phpt +++ b/ext/soap/tests/bugs/bug36999.phpt @@ -19,7 +19,7 @@ class LocalSoapClient extends SoapClient { $this->server->addFunction('echoLong'); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { ob_start(); $this->server->handle($request); $response = ob_get_contents(); diff --git a/ext/soap/tests/bugs/bug37083.phpt b/ext/soap/tests/bugs/bug37083.phpt index 55a6278078df5..554a0b62464b7 100644 --- a/ext/soap/tests/bugs/bug37083.phpt +++ b/ext/soap/tests/bugs/bug37083.phpt @@ -7,7 +7,7 @@ soap.wsdl_cache=3 --FILE-- diff --git a/ext/soap/tests/bugs/bug38004.phpt b/ext/soap/tests/bugs/bug38004.phpt index 1113ae73a4ce0..9459faa6493bf 100644 --- a/ext/soap/tests/bugs/bug38004.phpt +++ b/ext/soap/tests/bugs/bug38004.phpt @@ -19,7 +19,7 @@ class TestSoapClient extends SoapClient { $this->server->addFunction('Test'); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { ob_start(); $this->server->handle($request); $response = ob_get_contents(); diff --git a/ext/soap/tests/bugs/bug38005.phpt b/ext/soap/tests/bugs/bug38005.phpt index 0efa8e0395403..c025c14c12946 100644 --- a/ext/soap/tests/bugs/bug38005.phpt +++ b/ext/soap/tests/bugs/bug38005.phpt @@ -17,7 +17,7 @@ class TestSoapClient extends SoapClient { $this->server->addFunction('Test'); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { ob_start(); $this->server->handle($request); $response = ob_get_contents(); diff --git a/ext/soap/tests/bugs/bug38055.phpt b/ext/soap/tests/bugs/bug38055.phpt index 5a9c1d5d36a12..6c8744cc8bb89 100644 --- a/ext/soap/tests/bugs/bug38055.phpt +++ b/ext/soap/tests/bugs/bug38055.phpt @@ -20,7 +20,7 @@ class TestSoapClient extends SoapClient { $this->server->addFunction('Test'); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { ob_start(); $this->server->handle($request); $response = ob_get_contents(); diff --git a/ext/soap/tests/bugs/bug38067.phpt b/ext/soap/tests/bugs/bug38067.phpt index a5f4a05569759..778d429373f2a 100644 --- a/ext/soap/tests/bugs/bug38067.phpt +++ b/ext/soap/tests/bugs/bug38067.phpt @@ -19,7 +19,7 @@ class TestSoapClient extends SoapClient { $this->server->addFunction('Test'); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { ob_start(); $this->server->handle($request); $response = ob_get_contents(); diff --git a/ext/soap/tests/bugs/bug38536.phpt b/ext/soap/tests/bugs/bug38536.phpt index 59b432ab46d9c..fb5dcc239568e 100644 --- a/ext/soap/tests/bugs/bug38536.phpt +++ b/ext/soap/tests/bugs/bug38536.phpt @@ -7,7 +7,7 @@ soap.wsdl_cache_enabled=0 --FILE-- diff --git a/ext/soap/tests/bugs/bug39815.phpt b/ext/soap/tests/bugs/bug39815.phpt index c67614a7972c1..688c995822daf 100644 --- a/ext/soap/tests/bugs/bug39815.phpt +++ b/ext/soap/tests/bugs/bug39815.phpt @@ -23,7 +23,7 @@ class LocalSoapClient extends SoapClient { $this->server->addFunction('test'); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { ob_start(); $this->server->handle($request); $response = ob_get_contents(); diff --git a/ext/soap/tests/bugs/bug42692.phpt b/ext/soap/tests/bugs/bug42692.phpt index 42869ad7eec6c..e132672342e8f 100644 --- a/ext/soap/tests/bugs/bug42692.phpt +++ b/ext/soap/tests/bugs/bug42692.phpt @@ -18,7 +18,7 @@ class TestSoap extends SoapClient { $this->server->addFunction("checkAuth"); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { ob_start(); $this->server->handle($request); $response = ob_get_contents(); diff --git a/ext/soap/tests/bugs/bug43045.phpt b/ext/soap/tests/bugs/bug43045.phpt index 4f696c21bd476..633b22ef35388 100644 --- a/ext/soap/tests/bugs/bug43045.phpt +++ b/ext/soap/tests/bugs/bug43045.phpt @@ -14,7 +14,7 @@ class TestSoapClient extends SoapClient { $this->server = new SoapServer($wsdl, $options); $this->server->addFunction('test'); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { ob_start(); $this->server->handle($request); $response = ob_get_contents(); diff --git a/ext/soap/tests/bugs/bug44882.phpt b/ext/soap/tests/bugs/bug44882.phpt index b8b375ceb2e60..2a6fa526d4d6a 100644 --- a/ext/soap/tests/bugs/bug44882.phpt +++ b/ext/soap/tests/bugs/bug44882.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 diff --git a/ext/soap/tests/bugs/bug46419.phpt b/ext/soap/tests/bugs/bug46419.phpt index 7f7eb839e3e81..092cbaa7797f1 100644 --- a/ext/soap/tests/bugs/bug46419.phpt +++ b/ext/soap/tests/bugs/bug46419.phpt @@ -16,7 +16,7 @@ class LocalSoapClient extends SoapClient { $this->server->addFunction('bar'); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { ob_start(); $this->server->handle($request); $response = ob_get_contents(); diff --git a/ext/soap/tests/bugs/bug50675.phpt b/ext/soap/tests/bugs/bug50675.phpt index 51cf4942bda5b..8eade05686571 100644 --- a/ext/soap/tests/bugs/bug50675.phpt +++ b/ext/soap/tests/bugs/bug50675.phpt @@ -6,7 +6,7 @@ soap server->setObject(new testSoap()); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { ob_start(); $this->server->handle($request); $response = ob_get_contents(); diff --git a/ext/soap/tests/bugs/bug54911.phpt b/ext/soap/tests/bugs/bug54911.phpt index 217923fe9656a..0a652cd297726 100644 --- a/ext/soap/tests/bugs/bug54911.phpt +++ b/ext/soap/tests/bugs/bug54911.phpt @@ -5,7 +5,7 @@ soap --FILE-- diff --git a/ext/soap/tests/bugs/bug73237.phpt b/ext/soap/tests/bugs/bug73237.phpt index e9d7c19edb0c2..83630b8add7f9 100644 --- a/ext/soap/tests/bugs/bug73237.phpt +++ b/ext/soap/tests/bugs/bug73237.phpt @@ -7,7 +7,7 @@ soap.wsdl_cache_enabled=0 --FILE-- trueCampaignMember00vi0000011VMgeAAG00vi0000011VMgeAAG701i0000001lreeAAASent00Qi000001UrbYFEAZLeadangela.lansbury@cbs.com1 EOF; diff --git a/ext/soap/tests/classmap002.phpt b/ext/soap/tests/classmap002.phpt index 3d78ea37534d1..6f27094ebf94d 100644 --- a/ext/soap/tests/classmap002.phpt +++ b/ext/soap/tests/classmap002.phpt @@ -7,7 +7,7 @@ soap.wsdl_cache_enabled=0 --FILE-- diff --git a/ext/soap/tests/classmap003.phpt b/ext/soap/tests/classmap003.phpt index f33434107f85b..c3181bb95249e 100644 --- a/ext/soap/tests/classmap003.phpt +++ b/ext/soap/tests/classmap003.phpt @@ -33,7 +33,7 @@ class LocalSoapClient extends SoapClient { $this->server->addFunction("f"); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { ob_start(); $this->server->handle($request); $response = ob_get_contents(); diff --git a/ext/soap/tests/classmap004.phpt b/ext/soap/tests/classmap004.phpt index f1069a9f390fe..541a336437868 100644 --- a/ext/soap/tests/classmap004.phpt +++ b/ext/soap/tests/classmap004.phpt @@ -41,7 +41,7 @@ class LocalSoapClient extends SoapClient { $this->server->addFunction("f"); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { ob_start(); $this->server->handle($request); $response = ob_get_contents(); diff --git a/ext/soap/tests/transport001.phpt b/ext/soap/tests/transport001.phpt index 6f3f4374ad04b..c2ceb913fd79c 100644 --- a/ext/soap/tests/transport001.phpt +++ b/ext/soap/tests/transport001.phpt @@ -16,7 +16,7 @@ class LocalSoapClient extends SoapClient { $this->server->addFunction('Add'); } - function __doRequest($request, $location, $action, $version, $one_way = 0) { + function __doRequest($request, $location, $action, $version, $one_way = 0): ?string { ob_start(); $this->server->handle($request); $response = ob_get_contents(); diff --git a/ext/soap/tests/typemap003.phpt b/ext/soap/tests/typemap003.phpt index 301ba257251b0..c1b205bef8582 100644 --- a/ext/soap/tests/typemap003.phpt +++ b/ext/soap/tests/typemap003.phpt @@ -8,7 +8,7 @@ soap.wsdl_cache_enabled=0 --FILE-- diff --git a/ext/soap/tests/typemap004.phpt b/ext/soap/tests/typemap004.phpt index d6be88fb5da00..f180a0130350a 100644 --- a/ext/soap/tests/typemap004.phpt +++ b/ext/soap/tests/typemap004.phpt @@ -7,7 +7,7 @@ soap.wsdl_cache_enabled=0 --FILE-- diff --git a/ext/soap/tests/typemap008.phpt b/ext/soap/tests/typemap008.phpt index b36ecdcb73071..00e89e3cd260e 100644 --- a/ext/soap/tests/typemap008.phpt +++ b/ext/soap/tests/typemap008.phpt @@ -7,7 +7,7 @@ soap.wsdl_cache_enabled=0 --FILE-- diff --git a/ext/soap/tests/typemap012.phpt b/ext/soap/tests/typemap012.phpt index 9978299ac3404..963589879d5af 100644 --- a/ext/soap/tests/typemap012.phpt +++ b/ext/soap/tests/typemap012.phpt @@ -7,7 +7,7 @@ soap.wsdl_cache_enabled=0 --FILE--