src/Call/CallData.php
public function generatorResponse(): array
    {
        if ($this->endEvent instanceof ReturnedEvent) {
            return [null, $this->endEvent->value()];
        }

        if ($this->endEvent instanceof ThrewEvent) {
            return [$this->endEvent->exception(), null];
        }

        throw new UndefinedResponseException(
            'The call has not yet responded via generator.'
        );
    }
public function generatorResponse(): array
    {
        if ($this->endEvent instanceof ReturnedEvent) {
            return [null, $this->endEvent->value()];
        }

        if ($this->endEvent instanceof ThrewEvent) {
            return [$this->endEvent->exception(), null];
        }

        throw new UndefinedResponseException(
            'The call has not yet responded via generator.'
        );
    }
public function generatorResponse ( ) : array { if ( $ this -> endEvent instanceof ReturnedEvent ) { return [ null , $ this -> endEvent -> value ( ) ] ; } if ( $ this -> endEvent instanceof ThrewEvent ) { return [ $ this -> endEvent -> exception ( ) , null ] ; } throw new UndefinedResponseException ( 'The call has not yet responded via generator.' ) ; }
Get the response from the generator.

@return tuple<Throwable|null,mixed> A 2-tuple of thrown exception or null, and return value.
@throws UndefinedResponseException  If this call has not yet responded via generator.
Get the response from the generator .