@param array $data

@return array
494700
protected function postSerialization(array $data)
    {
        $this->formatScalarValues($data);
        RecursiveDeleteHelper::deleteKeys($data, [Serializer::CLASS_IDENTIFIER_KEY]);

        return $data;
    }
1094685
public function mapQueries(array $data): array
    {
        $queries = [];

        foreach ($data as $dataItem) {
            $queryId = (int) $dataItem['id'];
            $locale = $dataItem['locale'];

            if (!isset($queries[$queryId])) {
                $queries[$queryId] = [
                    'id' => $queryId,
                    'collectionId' => (int) $dataItem['collection_id'],
                    'type' => $dataItem['type'],
                    'status' => (int) $dataItem['status'],
                ];
            }

            $queries[$queryId]['parameters'][$locale] = $this->buildParameters((string) $dataItem['parameters']);
            $queries[$queryId]['availableLocales'][] = $locale;
        }

        $queries = array_values(
            array_map(
                static function (array $queryData): Query {
                    ksort($queryData['parameters']);
                    sort($queryData['availableLocales']);

                    return Query::fromArray($queryData);
                },
                $queries
            )
        );

        return $queries;
    }
1365219
protected function buildArray(array $data)
    {
        $insert_values = [];

        foreach ($data as $key => $value) {
            if ($value === null) {
                $insert_values[] = sprintf('%s => NULL', $this->escape($key));
            } else {
                $insert_values[] = sprintf(
                    '%s => %s',
                    $this->escape($key),
                    $this->escape($value)
                );
            }
        }

        return $insert_values;
    }
683918
protected function removeRedundantParams(array $data): array
    {
        $data = array_filter($data, function ($item) {
            if ($item instanceof ArrayObject) {
                return $item->count() !== 0;
            }
            return !empty($item);
        });

        foreach ($data as $key => $value) {
            if (is_array($value) || $value instanceof ArrayObject) {
                $data[$key] = $this->removeRedundantParams($value);
            }
        }

        return $data;
    }
1239851
public function arraySerialize(array $Data)
    {
        $Result = "";
        foreach ($Data as $Value) {
            if ($Result == "") {
                $Result = floor($Value);
            } else {
                $Result = $Result . "," . floor($Value);
            }
        }

        return $Result;
    }
954277
protected function mapData(array $data) {
        $config = $this->loadConfig();

        foreach ($data as $k => $d) {
            if (!empty($config['diagnostic']['customInput'][$k])) {
                $data[$config['diagnostic']['customInput'][$k]] = $d;
                unset($data[$k]);
            }
        }

        return $data;
    }
1225758
public function parseData(array $data) : array
    {
        if ($this->getTransformer() instanceof RequestTransformerContract) {
            return $this->getTransformer()->transformRequestData($data);
        }

        return $data;
    }
101006
private function toArrayInternal($data)
    {
        if (is_array($data)) {
            foreach ($data as $key => $value) {
                if (is_array($value)) {
                    $data[$key] = $this->toArrayInternal($value);
                }

                if (is_object($value)) {
                    $data[$key] = ArrayHelper::toArray($value);
                }
            }

            return $data;
        }
        elseif (is_object($data)) {
            return ArrayHelper::toArray($data);
        }
        else {
            return [$data];
        }
    }
166953
public function decode($data): array
    {
        $result = RequestContext::getServerBean($this->formatHandlerClass)->decode($data);
        if(!is_array($result))
        {
            $result = [];
        }
        return $result;
    }
544307
public function createRules(array $data): array
    {
        return array_map(function ($data) {
            if ($data instanceof Rule) {
                return $data;
            }

            return Rule::createFromData((array) $data);
        }, $data);
    }
1059212
private function _merge(array $data) : array
    {
        $values = $this->getValues();
        $values = array_merge($values, $data);
        return $values;
    }
954202
public function createConditions(array $data): array
    {
        return array_map(function ($data) {
            if ($data instanceof self) {
                return $data;
            }

            return self::createFromData((array) $data);
        }, $data);
    }
1336405
public function getChartData(array $data = []) : array
    {
        $chartData = [
            'chart' => $this->type,
            'options' => [
                'element' => $this->getContainerId(),
                'resize' => true,
            ],
        ];

        $options = [
            'data' => $data,
        ];

        $chartData['options'] = array_merge($chartData['options'], $options);

        if (!empty($data)) {
            $this->setData($chartData);
        }

        return $chartData;
    }
1153369
private function deserialize($data)
    {
        $result = json_decode(base64_decode($data, true), true);

        return is_array($result) ? $result : [];
    }
801091
protected function filterData($data): array
    {
        if (empty($this->getFields())) {
            return $data;
        }
        return array_intersect_key($data, array_flip($this->getFields()));
    }
1276646
private function prepareData(array $data)
    {
        $inserts = array_dot($data);
        $updates = [];
        $deletes = [];

        foreach ($this->model()->lists('key') as $key) {
            if (isset($inserts[$key]))
                $updates[$key] = $inserts[$key];
            else
                $deletes[]     = $key;

            unset($inserts[$key]);
        }

        return [$inserts, $updates, $deletes];
    }
91126
protected function _toArray($data)
    {
        $array = array();

        foreach ($data as $key => $value) {
            if (is($value, 'AnDomainBehaviorSerializable')) {
                $array[$key] = $value->toSerializableArray();
            } elseif (is_array($value)) {
                $array[$key] = $this->_toArray($value);
            } else {
                $array[$key] = $value;
            }
        }

        return $array;
    }