Skip to content

Commit

Permalink
ext/standard: Transform tentative return types into proper types for …
Browse files Browse the repository at this point in the history
…Directory class

This class is now final
  • Loading branch information
Girgias committed Oct 27, 2024
1 parent 0640fba commit e8a1781
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
3 changes: 0 additions & 3 deletions ext/standard/dir.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
Expand Down
6 changes: 3 additions & 3 deletions ext/standard/dir_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -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] {
}
Expand All @@ -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 ]
}
}
}

0 comments on commit e8a1781

Please sign in to comment.