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