Current path: home/webdevt/prestashop17/modules/ps_mbo/vendor/react/promise/tests/fixtures/
?? Go up: /home/webdevt/prestashop17/modules/ps_mbo/vendor/react/promise/tests
<?php
namespace React\Promise;
class SimpleRejectedTestPromise implements PromiseInterface
{
public function then(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null)
{
try {
if ($onRejected) {
$onRejected('foo');
}
return new self();
} catch (\Throwable $exception) {
return new RejectedPromise($exception);
} catch (\Exception $exception) {
return new RejectedPromise($exception);
}
}
}