Updates id for multilingual inputs with custom id.

@param string $method
@param array $arguments
@param mixed $field
@return array
194789
protected function updateArguments($method, $arguments, $field)
    {
        if ($method == 'widget' && isset($arguments[1]['options']['id'])) {
            $arguments[1]['options']['id'] = MultilingualHelper::getAttributeName($arguments[1]['options']['id'], $field->language);
        }

        if (in_array($method, ['textInput', 'textarea', 'radio', 'checkbox', 'fileInput', 'hiddenInput', 'passwordInput']) && isset($arguments[0]['id'])) {
            $arguments[0]['id'] = MultilingualHelper::getAttributeName($arguments[0]['id'], $field->language);
        }

        if (in_array($method, ['input', 'dropDownList', 'listBox', 'radioList', 'checkboxList']) && isset($arguments[1]['id'])) {
            $arguments[1]['id'] = MultilingualHelper::getAttributeName($arguments[1]['id'], $field->language);
        }

        return $arguments;
    }
905471
protected function validateFieldsExist(string $method, string $fieldName, string $otherFieldName)
    {
        foreach ([$fieldName, $otherFieldName] as $name) {
            if (!isset($this->fields[$fieldName])) {
                throw InvalidArgumentException::format(
                        "Invalid call to %s: field with name \'%s\' has not currently been defined in the form", $method, $name);
            }
        }
    }
232150
private function parse(string $method, ...$arguments)
    {
        if (null === $this->value) {
            return $this->default;
        }

        return self::$method($this->value, ...$arguments);
    }
240308
public function transChoice($id, $number, array $parameters = [], $domain = null, $locale = null)
    {
        @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the trans() one instead with a "%%count%%" parameter.', __METHOD__), E_USER_DEPRECATED);

        if (!$this->formatter instanceof ChoiceMessageFormatterInterface) {
            throw new LogicException(sprintf('The formatter "%s" does not support plural translations.', \get_class($this->formatter)));
        }

        if (null === $domain) {
            $domain = 'messages';
        }

        $id = (string) $id;
        $catalogue = $this->getCatalogue($locale);
        $locale = $catalogue->getLocale();
        while (!$catalogue->defines($id, $domain)) {
            if ($cat = $catalogue->getFallbackCatalogue()) {
                $catalogue = $cat;
                $locale = $catalogue->getLocale();
            } else {
                break;
            }
        }

        if ($this->hasIntlFormatter && $catalogue->defines($id, $domain.MessageCatalogue::INTL_DOMAIN_SUFFIX)) {
            return $this->formatter->formatIntl($catalogue->get($id, $domain), $locale, ['%count%' => $number] + $parameters);
        }

        return $this->formatter->choiceFormat($catalogue->get($id, $domain), $number, $locale, $parameters);
    }
459741
protected function __parseLinkJoin($arguments, $method)
	{
		if(!isset($this->operationOption['join']))
		{
			$this->operationOption['join'] = array();
		}
		array_unshift($arguments,$method);
		$this->operationOption['join'][] = $arguments;
	}
1141061
protected function tryMethod($method, array $arguments = array())
    {
        try {
            call_user_func_array(array($this, $method), $arguments);

            return true;
        } catch (\Exception $e) {
            return false;
        }
    }
1215313
public function notify($method, array $arguments)
    {
        $message = array(
            'jsonrpc' => self::VERSION,
            'method' => $method
        );

        if ($arguments !== null) {
            $message['params'] = $arguments;
        }

        $this->messages[] = $message;
        return $this;
    }
959486
protected function apply($method, $arguments)
    {
        if (! method_exists($this, $method))
        {
           throw new \BadMethodCallException(sprintf('Method %s do not exists', $method));
        }

        switch (count($arguments))
        {
            case 0:
                return $this->{$method}();

            case 1:
                return $this->{$method}($arguments[0]);

            case 2:
                return $this->{$method}($arguments[0], $arguments[1]);

            case 3:
                return $this->{$method}($arguments[0], $arguments[1], $arguments[2]);

            default:
                return call_user_func_array(array($this, $method), $arguments);
        }
    }
202808
public function call($method, array $arguments = [])
    {
        if ($this->value === null) {
            return null;
        } elseif (is_object($this->value)) {
            $callback = [$this->value, $method];
        } elseif (is_array($this->value)) {
            if (!array_key_exists($method, $this->value)) {
                throw new EvaluationException('Array has no function "' . $method . '"', 1344350459);
            }
            $callback = $this->value[$method];
        } else {
            throw new EvaluationException('Needs object or array to call method "' . $method . '", but has ' . gettype($this->value), 1344350454);
        }
        if (!is_callable($callback)) {
            throw new EvaluationException('Method "' . $method . '" is not callable', 1344350374);
        }
        $argumentsCount = count($arguments);
        for ($i = 0; $i < $argumentsCount; $i++) {
            if ($arguments[$i] instanceof Context) {
                $arguments[$i] = $arguments[$i]->unwrap();
            }
        }
        return call_user_func_array($callback, $arguments);
    }
1022181
public function sendReminder($method = null)
    {
        if ($method) {
            if (!in_array($method, array('Email', 'Letter')))
                throw new InvalidFieldValueError("'method' must be either " .
                    "'Email' or 'Letter'");

            return $this->performEvent('remind', array('method' => $method));
        }

        return $this->performEvent('remind');
    }
110117
public function call(string $method, array $arguments): Response
    {
        try {
            return $this->request('GET', $method, [
                'query' => $arguments
            ]);
        } catch (\Exception $e) {
            throw new ClientException($e->getMessage(), $e->getCode(), $e);
        }
    }
393898
public function notify($method, array $arguments = null)
    {
        $this->client->notify($method, $arguments);

        return $this;
    }
1129266
private function convertTypeDeclarationsToInstances(ReflectionMethod $method, Input $field): void
    {
        $field->setTypeInstance($this->getTypeFromPhpDeclaration($method, $field->getType()));
    }
158915
public function trans($id, array $parameters = [], $domain = null, $locale = null)
    {
        if (null === $domain) {
            $domain = 'messages';
        }

        $format = $this->getCatalogue($locale)->get((string) $id, $domain);

        if ($format instanceof Closure) {
            // @codeCoverageIgnoreStart
            try {
                $count = (new ReflectionFunction($format))->getNumberOfRequiredParameters();
            } catch (ReflectionException $exception) {
                $count = 0;
            }
            // @codeCoverageIgnoreEnd

            return $format(
                ...array_values($parameters),
                ...array_fill(0, max(0, $count - count($parameters)), null)
            );
        }

        return parent::trans($id, $parameters, $domain, $locale);
    }
26307
protected function invokeMethod($object, $method, array $arguments = array())
    {
        return $this->getReflectionMethod($object, $method)->invokeArgs($object, $arguments);
    }
330662
private function callFindAllBy(string $method, array $arguments)
    {
        $whereByWithUpper = lcfirst(substr($method, 9, mb_strlen($method)));
        $whereBy = Str::convertCamelCaseToSnakeCase($whereByWithUpper);

        return $this->where($whereBy, '=', $arguments[0])->findAll();
    }
1334141
private function completeFieldArguments(Field $field, ReflectionMethod $method, DocBlockReader $docBlock): void
    {
        $argsFromAnnotations = $field->args;
        $args = [];
        foreach ($method->getParameters() as $param) {
            // Either get existing, or create new argument
            $arg = $argsFromAnnotations[$param->getName()] ?? new Argument();
            $args[$param->getName()] = $arg;

            $this->completeArgumentFromTypeHint($arg, $method, $param, $docBlock);
        }

        $extraAnnotations = array_diff(array_keys($argsFromAnnotations), array_keys($args));
        if ($extraAnnotations) {
            throw new Exception('The following arguments were declared via `@API\Argument` annotation but do not match actual parameter names on method ' . $this->getMethodFullName($method) . '. Either rename or remove the annotations: ' . implode(', ', $extraAnnotations));
        }

        $field->args = $args;
    }