@param array $value

@return string
975300
protected function generateComplexity(array $value): string
    {
        $resolveComplexity = parent::generateComplexity($value);
        $resolveComplexity = \ltrim($this->prefixCodeWithSpaces($resolveComplexity));

        if ('null' === $resolveComplexity) {
            return $resolveComplexity;
        }

        $argumentClass = $this->shortenClassName(Argument::class);

        $code = <<<'CODE'
function ($childrenComplexity, $args = []) <closureUseStatements>{
<spaces><spaces>$resolveComplexity = %s;

<spaces><spaces>return call_user_func_array($resolveComplexity, [$childrenComplexity, new %s($args)]);
<spaces>}
CODE;

        $code = \sprintf($code, $resolveComplexity, $argumentClass);

        return $code;
    }
89002
public function value($value)
    {
        //terminal case
        if (!is_array($value)) {
            if (strpbrk($value, Lexer::ESCAPED_STRING) !== false) {
                if (!(substr($value, 0, 1) == '"' && substr($value, -1) == '"')) {
                    return '(' . addcslashes($value, Lexer::ESCAPED_STRING_PAREN_ENCAPSED) . ')';
                }
            }
            return $value;
        }

        //composite value case
        $pairs = array();
        foreach ($value as $key => $subval) {
            $pairs[] = "{$this->identifier($key)} = {$this->value($subval)}";
        }

        return '(' . implode(', ', $pairs) . ')';
    }
945116
protected function resolveValue($value)
    {
        if (is_array($value)) {
            foreach ($value as $index => $val) {
                $value[$index] = $this->resolveValue($val);
            }

            return $value;
        }

        if (is_string($value) && '@' == $value[0]) {
            return $this->offsetGet(substr($value, 1));
        }

        return $value;
    }
1016607
public static function clean_vars($value){
        if(is_array($value)){
            foreach($value as $key => $val) {
                $value[$key] = self::clean_vars($val);
            }
        }
        else{
            $value= self::filter_simple_xss($value);
        }
        return $value;
    }
334152
protected function serializeArray(array $value)
    {
        if (\array_key_exists(self::MAP_TYPE, $value)) {
            return $value;
        }

        $toArray = [self::MAP_TYPE => 'array', self::SCALAR_VALUE => []];
        foreach ($value as $key => $field) {
            $toArray[self::SCALAR_VALUE][$key] = $this->serializeData($field);
        }

        return $this->serializeData($toArray);
    }
120865
protected function serializeValue($value)
    {
        if (is_string($value)) {
            return $value;
        }
        if (is_object($value) || is_array($value)) {
            return json_encode($value);
        }
    }
503605
protected static function export(array $value)
	{
		$pairs = [];
		foreach ($value as $k => $v)
		{
			$pairs[] = var_export($k, true) . '=>' . var_export($v, true);
		}

		return '[' . implode(',', $pairs) . ']';
	}
1162474
public static function maybeEncode($value)
    {
        if (is_array($value) || is_object($value)) {
            $value = json_encode($value);
        }

        return $value;
    }
353889
protected static function stringify($value): string
    {
        if (is_object($value)) {
            return 'Object(' . get_class($value) . ')';

        } elseif (is_array($value)) {
            $strings = [];
            foreach ($value as $k => $v) {
                $strings[] = sprintf('%s => %s', $k, self::stringify($v));
            }
            return 'Array(' . implode(', ', $strings) . ')';

        } elseif (is_resource($value)) {
            return 'Resource (' . get_resource_type($value) . ')';

        } elseif (is_null($value)) {
            return 'null';

        } elseif (is_bool($value)) {
            return $value ? 'true' : 'false';
        }

        return "'" . (string)$value . "'";
    }
254385
protected function sanitizeToArrayValue($value)
    {
        if ($value instanceof Message) {
            return (new self($value))->toArray();
        }

        if ($value instanceof RepeatedField) {
            $values = [];
            foreach ($value as $k => $v) {
                $values[] = $this->sanitizeToArrayValue($v);
            }

            return $values;
        }

        if ($value instanceof self) {
            return $value->toArray();
        }

        return $value;
    }
189818
public function makeStorableArrayFieldValue($value)
    {
        if ($this->_isEncodedArrayFieldValue($value)) {
            $value = $this->_decodeArrayFieldValue($value);
        }

        $value = $this->_serializeValue($value);
        return $value;
    }
1205789
protected function _decodeArrayFieldValue(array $value)
    {
        $result = array();
        unset($value['__empty']);
        foreach ($value as $_id => $row) {
            if (!is_array($row) || !array_key_exists(
                'installment_currency',
                $row
            ) || !array_key_exists(
                'installment_boundary',
                $row
            ) || !array_key_exists(
                'installment_frequency',
                $row
            ) || !array_key_exists('installment_interest', $row)) {
                continue;
            }

            $currency = $row['installment_currency'];
            $boundary = $row['installment_boundary'];
            $frequency = $row['installment_frequency'];
            $interest = $row['installment_interest'];
            $result[] = array($currency, $boundary, $frequency, $interest);
        }

        return $result;
    }
1145782
private function prepareValue($value)
    {
        if (is_array($value)) {
            foreach ($value as &$val) {
                if (is_array($val) and count($val) === 1) {
                    $val = array_shift($val);
                }
            }
            unset($val);

            if (count($value) === 1) {
                $value = array_shift($value);
            }
        }

        return $value;
    }
158949
protected function encodeNotArray($value)
    {
        $value = (string) $value;
        $value = trim($value);
        $value = str_replace("\n", "\n\t", $value);

        return "\n\t{$value}\n";
    }
1237089
public function getPatterned($value)
    {
        if (!is_array($value)) {
            return str_replace('%value', ucfirst($value), $this->pattern);
        } else {
            $return = $this->pattern;
            foreach ($value as $field) {
                if (!isset($field['name']) and ! isset($field['value'])) {
                    continue;
                }
                if (isset($field['value']) && is_array($field['value'])) {
                    $field['value'] = implode(',', $field['value']);
                }
                $return = str_replace('%' . $field['name'], $field['value'], $return);
            }
            return $return;
        }
    }
681628
private function serializeValue($value)
    {
        if (is_object($value)) {
            return $this->serializeObjectRecursively($value);
        } elseif (is_array($value)) {
            return $this->serializeArrayRecursively($value);
        }

        return $value;
    }
492343
public function _prep_value($value) {
		if (is_array($value)) {
			$value=implode(",", $value);
		}
		if (strrpos($value, 'this')===false&&strrpos($value, 'event')===false&&strrpos($value, 'self')===false) {
			$value='"'.$value.'"';
		}
		return $value;
	}