public __construct ( mixed $value = null ) | ||
$value | mixed | Anything other than an Promise object. |
public function __construct($value = null)
{
if ($value instanceof Promise) {
throw new \Error("Cannot use a promise as success value");
}
$this->value = $value;
}