*/ class AutoDisposingGenerator extends AutoDisposingStream implements GeneratorStream { /** @var GeneratorStream */ private $generator; public function __construct(GeneratorStream $generator) { parent::__construct($generator); $this->generator = $generator; } /** * @param mixed $value * * @psalm-param TSend $value * * @return Promise */ public function send($value): Promise { return $this->generator->send($value); } /** * @param \Throwable $exception * * @return Promise */ public function throw(\Throwable $exception): Promise { return $this->generator->throw($exception); } }