CodeExplorer wrapThenCallback example
private GuzzlePromiseInterface
$promise;
public function __construct(GuzzlePromiseInterface
$promise) { $this->promise =
$promise;
} public function then(callable
$onFulfilled = null, callable
$onRejected = null
): self
{ return new self($this->promise->
then( $this->
wrapThenCallback($onFulfilled),
$this->
wrapThenCallback($onRejected) ));
} public function cancel(): void
{ $this->promise->
cancel();
} public function getState(): string
{