Create reject function with cancellation queue
@param callable|null $reject
333490
protected function createRejectFunction($reject)
    {
        $this->reject = function($reason) use (&$reject) {
            $cancelQueue = $this->cancellationQueue;
            $cancelQueue();
            return isset($reject) ? $reject($reason) : null;
        };
    }
598330
function reject(r) {
    var capability = newPromiseCapability(this);
    capability.reject.call(undefined, r);
    return capability.promise;
  }
1198456
protected function rejectInvalidBallots(): int
    {
        foreach ($this->ballots as $i => $ballot) {
            if (!$this->checkBallotValidity($ballot)) {
                $this->rejectedBallots[] = clone $ballot;
                unset($this->ballots[$i]);
            }
        }

        $count = count($this->rejectedBallots);

        $this->logger->notice("Found $count rejected ballots");

        $this->validBallots = $this->validBallots - $count;

        return $count;
    }
959446
public static function cancel($params = null, $options = null)
    {
        $params['status'] = 'canceled';
        return self::_create($params, $options);
    }
82007
function RejectPacket(options) {
  if (!(this instanceof RejectPacket))
    return new RejectPacket(options);

  Packet.call(this);

  this.message = '';
  this.code = RejectPacket.codes.INVALID;
  this.reason = '';
  this.hash = null;

  if (options)
    this.fromOptions(options);
}
1058858
public function basic_reject($delivery_tag, $requeue)
    {
        list($class_id, $method_id, $args) = $this->protocolWriter->basicReject($delivery_tag, $requeue);
        $this->send_method_frame(array($class_id, $method_id), $args);
    }
1353936
public function rejectAction(Order $order)
    {
        $order->rejectBySeller();

        $em = $this->getDoctrine()->getEntityManager();
        $em->persist($order);
        $em->flush();

        return $this->redirect($this->generateUrl('Order_show', array(
            'id' => $order->getNumberForPath()
        )));
    }
713266
function rejectFields(result, fields) {
    // If result is an array, then rejection rules are applied to each array entry
    if (_.isArray(result)) {
        return _.map(result, (single_entry) => _.omit(single_entry, fields));
    }
    return _.omit(result, fields);
}
721085
protected function reject($message = null, $key = null)
    {
        $message = $message ?: static::class.' rejected the request.';
        $key = $key ?: static::class;

        throw new PerformerException($message, $key);
    }
613334
function (error) {
            this.error = error;
            this.isRejected = true;

            if (this.parent === null) {
                return;
            }

            this.parent.dispatch(this.name);
            this.parent.dispatch('reject', {
                data : { node : this, error: error }
            });
        }
747904
public void reject(final String[] errorCodes, final Map<String, Object> messageVariables, final String defaultMessage) {
        
        String[] codes = new String[0];
        for(String errorCode : errorCodes) {
            codes = Utils.concat(codes, messageCodeGenerator.generateCodes(errorCode, getObjectName()));
        }
        addError(new CsvError(getObjectName(), codes, messageVariables, defaultMessage));
    }
211188
public function reject(Message $message, $requeue = true)
    {
        return $this->rejectImpl($message->deliveryTag, $requeue);
    }
893631
public function cancel($matchId, $optParams = array())
  {
    $params = array('matchId' => $matchId);
    $params = array_merge($params, $optParams);
    return $this->call('cancel', array($params));
  }
87994
def reject(self, *, requeue=True):
        
        self.sender.send_BasicReject(self.delivery_tag, requeue)
650413
function reject(pred, m) {
  if(!isPredOrFunc(pred)) {
    throw new TypeError(
      'reject: Pred or predicate function required for first argument'
    )
  }

  const fn =
    x => predOrFunc(pred, x)

  if(m && isFunction(m.reject)) {
    return m.reject(fn)
  }

  if(isArray(m)) {
    return m.filter(not(fn))
  }

  if(isObject(m)) {
    return object.filter(not(fn), m)
  }

  throw new TypeError('reject: Foldable or Object required for second argument')
}
1010993
def reject!(connected_at, code, reason)
      self.update_node!(connected_at,
        connected: false,
        updated: false,
        websocket_connection: {
          opened: false,
          close_code: code,
          close_reason: reason,
        },
      )
      info "Rejected connection for node #{@node.to_path} at #{connected_at} with code #{code}: #{reason}"
    rescue => exc
      error exc
    end
1154488
function reject(promise, reason) {
    if (promise.state !== PENDING) return;

    promise.reason = reason;
    promise.state = REJECTED;

    return resolve(promise);
  }