REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 2.33 KB
Close
/opt/cpanel/ea-wappspector/vendor/rector/rector/vendor/react/promise/src/Internal/FulfilledPromise.php
Text
Base64
<?php namespace RectorPrefix202411\React\Promise\Internal; use RectorPrefix202411\React\Promise\PromiseInterface; use function RectorPrefix202411\React\Promise\resolve; /** * @internal * * @template T * @template-implements PromiseInterface<T> */ final class FulfilledPromise implements PromiseInterface { /** @var T */ private $value; /** * @param T $value * @throws \InvalidArgumentException */ public function __construct($value = null) { if ($value instanceof PromiseInterface) { throw new \InvalidArgumentException('You cannot create React\\Promise\\FulfilledPromise with a promise. Use React\\Promise\\resolve($promiseOrValue) instead.'); } $this->value = $value; } /** * @template TFulfilled * @param ?(callable((T is void ? null : T)): (PromiseInterface<TFulfilled>|TFulfilled)) $onFulfilled * @return PromiseInterface<($onFulfilled is null ? T : TFulfilled)> */ public function then(?callable $onFulfilled = null, ?callable $onRejected = null) : PromiseInterface { if (null === $onFulfilled) { return $this; } try { /** * @var PromiseInterface<T>|T $result */ $result = $onFulfilled($this->value); return resolve($result); } catch (\Throwable $exception) { return new RejectedPromise($exception); } } public function catch(callable $onRejected) : PromiseInterface { return $this; } public function finally(callable $onFulfilledOrRejected) : PromiseInterface { return $this->then(function ($value) use($onFulfilledOrRejected) : PromiseInterface { return resolve($onFulfilledOrRejected())->then(function () use($value) { return $value; }); }); } public function cancel() : void { } /** * @deprecated 3.0.0 Use `catch()` instead * @see self::catch() */ public function otherwise(callable $onRejected) : PromiseInterface { return $this->catch($onRejected); } /** * @deprecated 3.0.0 Use `finally()` instead * @see self::finally() */ public function always(callable $onFulfilledOrRejected) : PromiseInterface { return $this->finally($onFulfilledOrRejected); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 3
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
CancellationQueue.php
1.29 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FulfilledPromise.php
2.33 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
RejectedPromise.php
3.45 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).