public function __construct($value = null)
{
if ($value instanceof PromiseInterface) {
throw new InvalidArgumentException('You cannot create PromiseFulfilled with a promise. Use Promise::doResolve($promiseOrValue) instead.');
}
$this->value = $value;
}