$this->
waitIfPending();
if ($this->result instanceof PromiseInterface
) { return $this->result->
wait($unwrap);
} if ($unwrap) { if ($this->state === self::FULFILLED
) { return $this->result;
} // It's rejected so "unwrap" and throw an exception.
throw Create::
exceptionFor($this->result
);
} } public function getState(): string
{ return $this->state;
} public function cancel(): void
{ if ($this->state !== self::PENDING
) {