adapter = $adapter; $this->adoptedPromise = $adoptedPromise; } /** * @param callable|null $onFulfilled * @param callable|null $onRejected * * @return Promise */ public function then(callable $onFulfilled = null, callable $onRejected = null) { return $this->adapter->then($this, $onFulfilled, $onRejected); } }