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

        return self::doResolve($promiseOrValue)
            ->then(
                function($value) {
                    return new PromiseCancelled($value);
                },
                function($value) {
                    return new PromiseCancelled($value);
                }
            );
    }