promisor = $promisor; } /** * {@inheritdoc} */ public function onResolve(callable $onResolved) { if ($this->promise === null) { \assert($this->promisor !== null); $provider = $this->promisor; $this->promisor = null; $this->promise = call($provider); } \assert($this->promise !== null); $this->promise->onResolve($onResolved); } }