Skip to content

Fix missing null return type for Generator::current() & Generator::key() #1711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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 standard/_types.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,13 @@ public function valid(): bool {}

/**
* Returns whatever was passed to yield or null if nothing was passed or the generator is already closed.
* @return TYield
* @return TYield|null
*/
public function current(): mixed {}

/**
* Returns the yielded key or, if none was specified, an auto-incrementing key or null if the generator is already closed.
* @return TKey
* @return TKey|null
*/
#[LanguageLevelTypeAware(['8.0' => 'mixed'], default: 'string|float|int|bool|null')]
public function key() {}
Expand Down