예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function then(callable $onFulfilled = null, callable $onRejected = null) : Awaitable
 {
     if (null === $onRejected) {
         return $this;
     }
     return $this->result->then(null, $onRejected);
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function then(callable $onFulfilled = null, callable $onRejected = null) : Awaitable
 {
     return $this->awaitable->then($onFulfilled, $onRejected);
 }