mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +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:
parent
7080bc3bff
commit
ccf4c91688
@ -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) {}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user