Exemplo n.º 1
0
 /**
  * {@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;
 }
Exemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function isFailed() : bool
 {
     return $this->queue->isFailed();
 }