Skip to content

Commit 8870fe4

Browse files
committed
Declare tentative return types for ext/curl, ext/dom, ext/fileinfo
1 parent 532c60c commit 8870fe4

File tree

6 files changed

+345
-293
lines changed

6 files changed

+345
-293
lines changed

ext/curl/curl_file.stub.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ class CURLFile
1010

1111
public function __construct(string $filename, ?string $mime_type = null, ?string $posted_filename = null) {}
1212

13-
/** @return string */
14-
public function getFilename() {}
13+
/** @tentative-return-type */
14+
public function getFilename(): string {}
1515

16-
/** @return string */
17-
public function getMimeType() {}
16+
/** @tentative-return-type */
17+
public function getMimeType(): string {}
1818

19-
/** @return string */
20-
public function getPostFilename() {}
19+
/** @tentative-return-type */
20+
public function getPostFilename(): string {}
2121

22-
/** @return void */
23-
public function setMimeType(string $mime_type) {}
22+
/** @tentative-return-type */
23+
public function setMimeType(string $mime_type): void {}
2424

25-
/** @return void */
26-
public function setPostFilename(string $posted_filename) {}
25+
/** @tentative-return-type */
26+
public function setPostFilename(string $posted_filename): void {}
2727
}
2828

2929
class CURLStringFile

ext/curl/curl_file_arginfo.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 1c292af8bd32226f740bc1df947acbc162d56448 */
2+
* Stub hash: 6cc8d65814e0a45d71cdf765533e85353e749051 */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_CURLFile___construct, 0, 0, 1)
55
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
66
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mime_type, IS_STRING, 1, "null")
77
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, posted_filename, IS_STRING, 1, "null")
88
ZEND_END_ARG_INFO()
99

10-
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_CURLFile_getFilename, 0, 0, 0)
10+
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_CURLFile_getFilename, 0, 0, IS_STRING, 0)
1111
ZEND_END_ARG_INFO()
1212

1313
#define arginfo_class_CURLFile_getMimeType arginfo_class_CURLFile_getFilename
1414

1515
#define arginfo_class_CURLFile_getPostFilename arginfo_class_CURLFile_getFilename
1616

17-
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_CURLFile_setMimeType, 0, 0, 1)
17+
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_CURLFile_setMimeType, 0, 1, IS_VOID, 0)
1818
ZEND_ARG_TYPE_INFO(0, mime_type, IS_STRING, 0)
1919
ZEND_END_ARG_INFO()
2020

21-
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_CURLFile_setPostFilename, 0, 0, 1)
21+
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_CURLFile_setPostFilename, 0, 1, IS_VOID, 0)
2222
ZEND_ARG_TYPE_INFO(0, posted_filename, IS_STRING, 0)
2323
ZEND_END_ARG_INFO()
2424

0 commit comments

Comments
 (0)