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