@param \Riak\Client\Core\Query\Crdt\Op\SetOp $op

@return array
349868
private function convertSet(SetOp $op)
    {
        $value  = [];
        $add    = $op->getAdds();
        $remove = $op->getRemoves();

        if ( ! empty($add)) {
            $value['add_all'] = $add;
        }

        if ( ! empty($remove)) {
            //$remove is always array so we need remove_all
            $value['remove_all'] = $remove;
        }

        return $value;
    }
1130076
private function GetWSInitialRequest($operation)
	{
		if ($operation == 'FEDummy') {
			return array();
		}

		$ta = $this->afip->GetServiceTA('wsfe');

		return array(
			'Auth' => array( 
				'Token' => $ta->token,
				'Sign' 	=> $ta->sign,
				'Cuit' 	=> $this->afip->CUIT
				)
		);
	}
621867
public function aggregate(array $pipeline, array $op = [])
    {
        if (! TypeConverter::isNumericArray($pipeline)) {
            $operators = func_get_args();
            $pipeline = [];
            $options = [];

            $i = 0;
            foreach ($operators as $operator) {
                $i++;
                if (! is_array($operator)) {
                    trigger_error("Argument $i is not an array", E_USER_WARNING);
                    return;
                }

                $pipeline[] = $operator;
            }
        } else {
            $options = $op;
        }

        if (isset($options['cursor'])) {
            $options['useCursor'] = true;

            if (isset($options['cursor']['batchSize'])) {
                $options['batchSize'] = $options['cursor']['batchSize'];
            }

            unset($options['cursor']);
        } else {
            $options['useCursor'] = false;
        }

        try {
            $cursor = $this->collection->aggregate(TypeConverter::fromLegacy($pipeline), $options);

            return [
                'ok' => 1.0,
                'result' => TypeConverter::toLegacy($cursor),
                'waitedMS' => 0,
            ];
        } catch (\MongoDB\Driver\Exception\Exception $e) {
            throw ExceptionConverter::toLegacy($e, 'MongoResultException');
        }
    }
876182
function getOperationData($operation){
		if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) {
			$this->loadWSDL();
			if ($this->getError())
				return false;
		}
		if(isset($this->operations[$operation])){
			return $this->operations[$operation];
		}
		$this->debug("No data for operation: $operation");
	}
908991
public function getOperations()
    {
        $operations = [];
        foreach (static::attributes() as $attribute => $type) {
            if ($type === Operation::class && isset($this->$attribute)) {
                $operations[$attribute] = $this->$attribute;
            }
        }
        return $operations;
    }
533574
@SuppressWarnings("unchecked")
    public void setOps(final DBObject ops) {
        this.ops = (Map<String, Map<String, Object>>) ops;
    }
571745
protected function op_number_number($op, $left, $right)
    {
        $unit = empty($left[2]) ? $right[2] : $left[2];

        $value = 0;
        switch ($op) {
        case '+':
            $value = $left[1] + $right[1];
            break;
        case '*':
            $value = $left[1] * $right[1];
            break;
        case '-':
            $value = $left[1] - $right[1];
            break;
        case '%':
            $value = $left[1] % $right[1];
            break;
        case '/':
            if ($right[1] == 0) {
                $this->throwError('parse error: divide by zero');
            }
            $value = $left[1] / $right[1];
            break;
        case '<':
            return $this->toBool($left[1] < $right[1]);
        case '>':
            return $this->toBool($left[1] > $right[1]);
        case '>=':
            return $this->toBool($left[1] >= $right[1]);
        case '=<':
            return $this->toBool($left[1] <= $right[1]);
        default:
            $this->throwError('parse error: unknown number operator: '.$op);
        }

        return array('number', $value, $unit);
    }
390566
def set_op_upstreams(op_run, op):
    """"""
    # We get a list of all upstream ops or the current op
    upstream_ops = op.upstream_operations.values_list('id', flat=True)
    # We get latest op runs for the upstream_ops
    latest_op_runs = OperationRun.objects.filter(id__in=upstream_ops)
    latest_op_runs = latest_op_runs.annotate(max_date=Max('created_at'))
    latest_op_runs = latest_op_runs.filter(date=F('max_date'))
    # Set the upstream ops
    op_run.set(latest_op_runs)
1261107
public function curlOptSet($opt)
    {
        return isset($this->curlOpts[$opt]) || array_key_exists($opt, $this->curlOpts);
    }
874120
public function getFormatsFromOperation(string $resourceClass, string $operationName, string $operationType): array
    {
        $resourceMetadata = $this->resourceMetadataFactory->create($resourceClass);

        if (!$formats = $resourceMetadata->getTypedOperationAttribute($operationType, $operationName, 'formats', [], true)) {
            return $this->configuredFormats;
        }

        if (!\is_array($formats)) {
            throw new InvalidArgumentException(sprintf("The 'formats' attributes must be an array, %s given for resource class '%s'.", \gettype($formats), $resourceClass));
        }

        return $this->getOperationFormats($formats);
    }
706430
function getOperationData($operation, $bindingType = 'soap')
    {
        if ($bindingType == 'soap') {
            $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/';
        } elseif ($bindingType == 'soap12') {
            $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap12/';
        }
        // loop thru ports
        foreach ($this->ports as $port => $portData) {
            // binding type of port matches parameter
            if ($portData['bindingType'] == $bindingType) {
                // get binding
                //foreach($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) {
                foreach (array_keys($this->bindings[$portData['binding']]['operations']) as $bOperation) {
                    // note that we could/should also check the namespace here
                    if ($operation == $bOperation) {
                        $opData = $this->bindings[$portData['binding']]['operations'][$operation];

                        return $opData;
                    }
                }
            }
        }
    }
98694
private function operationUpdatesContact($operation)
    {
        if (isset($operation->response)) {
            foreach (['headers', 'body'] as $fieldType) {
                if (is_array($operation->response->{$fieldType})) {
                    foreach ($operation->response->{$fieldType} as $field) {
                        if (
                            isset($field->destination)
                            && '' !== $field->destination
                        ) {
                            return true;
                        }
                    }
                }
            }
        }

        return false;
    }
401319
public function where($field, $op = null, $condition = null)
    {
        $param = func_get_args();
        array_shift($param);
        $this->parseWhereExp('and', $field, $op, $condition, $param);
        return $this;
    }
497160
protected function doCall($operation)
    {
        $this->client->send($operation);
        $result = $this->client->recv();
        if(false === $result)
        {
            return false;
        }
        if(null === $result->throwable)
        {
            return $result->result;
        }
        else
        {
            throw $result->throwable;
        }
    }
1231506
public function on($c1, $op, $c2)
	{
		$this->_on[] = array($c1, $op, $c2, 'AND');

		return $this;
	}
580944
protected function getSetProps($object = null) {
    $object = $object ?: $this->value;
    if (gettype($object) !== 'object') {
      return [];
    }

    return array_keys((array) $object);
  }
261623
private function extractOperator($expr, $origPos, $tpl)
    {
        $op = $expr[0];
        $validOp = $this->isValidOperator($op);
        if ($validOp) {
            return $op;
        }

        $validVarChr = $this->isValidVarChr($op);
        if (false === $validVarChr) {
            return false;
        } else if (null === $validVarChr) {
            $pctEnc = substr($expr, 1, 2);
            if (!ctype_xdigit($pctEnc) || strlen($pctEnc) !== 2) {
                return false;
            } else {
                return null;
            }
        } else {
            return null;
        }
    }