public static function cancel($promise)
    {
        if (!static::isPromise($promise, true)) {
            throw new \InvalidArgumentException(sprintf('The "%s" method must be called with a compatible Promise.', __METHOD__));
        }
        $promise->cancel();
    }
public static function cancel($promise)
    {
        if (!static::isPromise($promise, true)) {
            throw new \InvalidArgumentException(sprintf('The "%s" method must be called with a compatible Promise.', __METHOD__));
        }
        $promise->cancel();
    }
public static function cancel ( $ promise ) { if ( ! static :: isPromise ( $ promise , true ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The "%s" method must be called with a compatible Promise.' , __METHOD__ ) ) ; } $ promise -> cancel ( ) ; }
Cancel a promise

@param PromiseInterface $promise
Cancel a promise