mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-07 09:17:29 +00:00
Declare tentative return types for ext/fileinfo
Relates to GH-6985
This commit is contained in:
2 files changed
+9
-9
No files matched your search
@@ -9,30 +9,30 @@ class finfo
|
||||
|
||||
/**
|
||||
* @param resource|null $context
|
||||
* @return string|false
|
||||
* @tentative-return-type
|
||||
* @alias finfo_file
|
||||
*/
|
||||
public function file(string $filename, int $flags = FILEINFO_NONE, $context = null) {}
|
||||
public function file(string $filename, int $flags = FILEINFO_NONE, $context = null): string|false {}
|
||||
|
||||
/**
|
||||
* @param resource|null $context
|
||||
* @return string|false
|
||||
* @tentative-return-type
|
||||
* @alias finfo_buffer
|
||||
*/
|
||||
public function buffer(string $string, int $flags = FILEINFO_NONE, $context = null) {}
|
||||
public function buffer(string $string, int $flags = FILEINFO_NONE, $context = null): string|false {}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @alias finfo_set_flags
|
||||
*/
|
||||
public function set_flags(int $flags) {}
|
||||
public function set_flags(int $flags) {} // TODO make return type void
|
||||
}
|
||||
|
||||
function finfo_open(int $flags = FILEINFO_NONE, ?string $magic_database = null): finfo|false {}
|
||||
|
||||
function finfo_close(finfo $finfo): bool {}
|
||||
|
||||
function finfo_set_flags(finfo $finfo, int $flags): bool {}
|
||||
function finfo_set_flags(finfo $finfo, int $flags): bool {} // TODO make return type void
|
||||
|
||||
/**
|
||||
* @param resource|null $context
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 2cd166d444d7324a9fe70170db434c05ccfbf386 */
|
||||
* Stub hash: 933465e008723d0991761b5779a80e5c72248a9c */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_finfo_open, 0, 0, finfo, MAY_BE_FALSE)
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FILEINFO_NONE")
|
||||
@@ -38,13 +38,13 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_finfo___construct, 0, 0, 0)
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, magic_database, IS_STRING, 1, "null")
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_finfo_file, 0, 0, 1)
|
||||
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_finfo_file, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
|
||||
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FILEINFO_NONE")
|
||||
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null")
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_finfo_buffer, 0, 0, 1)
|
||||
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_finfo_buffer, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
|
||||
ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0)
|
||||
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FILEINFO_NONE")
|
||||
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(0, context, "null")
|
||||
|
||||
Reference in new issue
Block a user