1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

The return value of generator methods can potentially be null (#5577)

* The return value of generator methods can potentially be null

* Add @psalm-ignore-nullable-return
This commit is contained in:
Daniil Gentili 2021-04-06 17:28:39 +02:00 committed by GitHub
parent 7080bc3bff
commit ccf4c91688
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,8 @@ interface Traversable {
*/ */
class Generator implements Traversable { class Generator implements Traversable {
/** /**
* @return TValue Can return any type. * @psalm-ignore-nullable-return
* @return ?TValue Can return any type.
*/ */
public function current() {} public function current() {}
@ -51,12 +52,14 @@ class Generator implements Traversable {
/** /**
* @param TSend $value * @param TSend $value
* @return TValue Can return any type. * @psalm-ignore-nullable-return
* @return ?TValue Can return any type.
*/ */
public function send($value) {} public function send($value) {}
/** /**
* @return TValue Can return any type. * @psalm-ignore-nullable-return
* @return ?TValue Can return any type.
*/ */
public function throw(Throwable $exception) {} public function throw(Throwable $exception) {}
} }