mirror of
https://github.com/danog/amp.git
synced 2024-12-02 17:37:50 +01:00
Increase psalm error level to level 5
This commit is contained in:
parent
f8efd44684
commit
71d7f5674c
@ -15,6 +15,7 @@ use React\Promise\PromiseInterface as ReactPromise;
|
||||
* before emitting values.
|
||||
*
|
||||
* @internal
|
||||
* @template-covariant TValue
|
||||
*/
|
||||
trait Producer
|
||||
{
|
||||
@ -41,6 +42,8 @@ trait Producer
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return Promise<bool>
|
||||
*/
|
||||
public function advance(): Promise
|
||||
{
|
||||
@ -72,6 +75,8 @@ trait Producer
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return Promise<TValue>
|
||||
*/
|
||||
public function getCurrent()
|
||||
{
|
||||
|
@ -2,12 +2,19 @@
|
||||
|
||||
namespace Amp;
|
||||
|
||||
/**
|
||||
* @template-covariant TValue
|
||||
* @template-implements Iterator<TValue>
|
||||
*/
|
||||
final class Producer implements Iterator
|
||||
{
|
||||
/**
|
||||
* @use Internal\Producer<TValue>
|
||||
*/
|
||||
use CallableMaker, Internal\Producer;
|
||||
|
||||
/**
|
||||
* @param callable(callable(mixed $value): Promise $emit): \Generator $producer
|
||||
* @param callable(callable(TValue $value): Promise $emit): \Generator $producer
|
||||
*
|
||||
* @throws \Error Thrown if the callable does not return a Generator.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user