mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
ext/standard: Transform tentative return types into proper types for Directory class
This class is now final
This commit is contained in:
@@ -99,19 +99,16 @@ final class Directory
|
||||
public readonly mixed $handle;
|
||||
|
||||
/**
|
||||
* @tentative-return-type
|
||||
* @implementation-alias closedir
|
||||
*/
|
||||
public function close(): void {}
|
||||
|
||||
/**
|
||||
* @tentative-return-type
|
||||
* @implementation-alias rewinddir
|
||||
*/
|
||||
public function rewind(): void {}
|
||||
|
||||
/**
|
||||
* @tentative-return-type
|
||||
* @implementation-alias readdir
|
||||
*/
|
||||
public function read(): string|false {}
|
||||
|
||||
6
ext/standard/dir_arginfo.h
generated
6
ext/standard/dir_arginfo.h
generated
@@ -1,12 +1,12 @@
|
||||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: 3fdc106d96cf9e728886637eecdb43c2552b174f */
|
||||
* Stub hash: 069117bab1b9502faf516307aa7e80308f7b7f13 */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_Directory_close, 0, 0, IS_VOID, 0)
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Directory_close, 0, 0, IS_VOID, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
#define arginfo_class_Directory_rewind arginfo_class_Directory_close
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_Directory_read, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_Directory_read, 0, 0, MAY_BE_STRING|MAY_BE_FALSE)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_FUNCTION(closedir);
|
||||
|
||||
@@ -12,9 +12,9 @@ $rc = new ReflectionClass("Directory");
|
||||
echo $rc;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
Structure of Directory class:
|
||||
Class [ <internal%s> final class Directory ] {
|
||||
Class [ <internal:standard> final class Directory ] {
|
||||
|
||||
- Constants [0] {
|
||||
}
|
||||
@@ -35,21 +35,21 @@ Class [ <internal%s> final class Directory ] {
|
||||
|
||||
- Parameters [0] {
|
||||
}
|
||||
- Tentative return [ void ]
|
||||
- Return [ void ]
|
||||
}
|
||||
|
||||
Method [ <internal:standard> public method rewind ] {
|
||||
|
||||
- Parameters [0] {
|
||||
}
|
||||
- Tentative return [ void ]
|
||||
- Return [ void ]
|
||||
}
|
||||
|
||||
Method [ <internal:standard> public method read ] {
|
||||
|
||||
- Parameters [0] {
|
||||
}
|
||||
- Tentative return [ string|false ]
|
||||
- Return [ string|false ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user