One Hat Cyber Team
Your IP :
216.73.216.187
Server IP :
178.63.234.5
Server :
Linux whm01.ins-jo.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Server Software :
Apache
PHP Version :
8.1.32
Buat File
|
Buat Folder
Dir :
~
/
home
/
business
/
www
/
vendor
/
php-http
/
promise
/
src
/
Edit File Name :
RejectedPromise.php
<?php namespace Http\Promise; /** * A rejected promise. * * @author Joel Wurtz <joel.wurtz@gmail.com> * * @template-covariant T * * @implements Promise<T> */ final class RejectedPromise implements Promise { /** * @var \Exception */ private $exception; public function __construct(\Exception $exception) { $this->exception = $exception; } /** * {@inheritdoc} */ public function then(callable $onFulfilled = null, callable $onRejected = null) { if (null === $onRejected) { return $this; } try { return new FulfilledPromise($onRejected($this->exception)); } catch (\Exception $e) { return new self($e); } } /** * {@inheritdoc} */ public function getState() { return Promise::REJECTED; } /** * {@inheritdoc} */ public function wait($unwrap = true) { if ($unwrap) { throw $this->exception; } } }
Save