Current Path : /var/www/storage/vendor/react/promise/tests/fixtures/ |
Current File : /var/www/storage/vendor/react/promise/tests/fixtures/SimpleFulfilledTestPromise.php |
<?php namespace React\Promise; class SimpleFulfilledTestPromise implements PromiseInterface { 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); } } }