public function done(callable $onFulfilled = null, callable $onRejected = null, callable $onCancel = null)
{
if (null === $onFulfilled) {
return;
}
$result = $onFulfilled($this->getValue());
if ($result instanceof PromiseInterface) {
$result->done();
}
}