File "SimpleFulfilledTestThenable.php"
Full path: /home/cakedeco/retaildirectonline.co.uk/system/storage/vendor/react/promise/tests/fixtures/SimpleFulfilledTestThenable.php
File
size: 523 B (523 B bytes)
MIME-type: text/x-php
Charset: utf-8
Download Open Edit Advanced Editor &nnbsp; Back
<?php
namespace React\Promise;
class SimpleFulfilledTestThenable
{
public function then(callable $onFulfilled = null, callable $onRejected = null, callable $onProgress = null)
{
try {
if ($onFulfilled) {
$onFulfilled('foo');
}
return new self();
} catch (\Throwable $exception) {
return new RejectedPromise($exception);
} catch (\Exception $exception) {
return new RejectedPromise($exception);
}
}
}