public static function doReject($promiseOrValue = null)
    {
        if (!$promiseOrValue instanceof PromiseInterface)
        {
            return new PromiseRejected($promiseOrValue);
        }

        return self::doResolve($promiseOrValue)->then(function($value) {
            return new PromiseRejected($value);
        });
    }
public static function doReject($promiseOrValue = null)
    {
        if (!$promiseOrValue instanceof PromiseInterface)
        {
            return new PromiseRejected($promiseOrValue);
        }

        return self::doResolve($promiseOrValue)->then(function($value) {
            return new PromiseRejected($value);
        });
    }
public static function doReject ( $ promiseOrValue = null ) { if ( ! $ promiseOrValue instanceof PromiseInterface ) { return new PromiseRejected ( $ promiseOrValue ) ; } return self :: doResolve ( $ promiseOrValue ) -> then ( function ( $ value ) { return new PromiseRejected ( $ value ) ; } ) ; }
Reject Promise or value.

@param PromiseInterface|mixed $promiseOrValue
@return PromiseInterface
@rejects Error|Exception|string|null
Reject Promise or value .