/** * {@inheritdoc} */ public function getReturn() { if (null === $this->placeholder || null !== $this->awaitable) { throw new UninitializedError('wait() must be called before calling this method.'); } if (!$this->complete) { throw new IncompleteError('The observable has not completed.'); } if ($this->queue->isFailed()) { throw $this->current; } return $this->current; }
/** * {@inheritdoc} */ public function isFailed() : bool { return $this->queue->isFailed(); }