Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ext/phar/tests/phar_oo_004.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ class MyDirectoryIterator extends DirectoryIterator
return parent::valid();
}

function key(): mixed
function key(): int
{
echo __METHOD__ . "\n";
return parent::key();
}

function current(): mixed
function current(): MyDirectoryIterator
{
echo __METHOD__ . "\n";
return parent::current();
Expand Down
14 changes: 4 additions & 10 deletions ext/spl/spl_directory.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,11 @@ public function rewind(): void {}
/** @tentative-return-type */
public function valid(): bool {}

/**
* @tentative-return-type
* @return int
*/
public function key(): mixed {} // TODO change return type to string
/** @tentative-return-type */
public function key(): int|string {}

/**
* @tentative-return-type
* @return DirectoryIterator
*/
public function current(): mixed {} // TODO narrow return type
/** @tentative-return-type */
public function current(): string|SplFileInfo|RecursiveDirectoryIterator {}

/** @tentative-return-type */
public function next(): void {}
Expand Down
7 changes: 4 additions & 3 deletions ext/spl/spl_directory_arginfo.h

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

Loading