@param array $data

@return array
342104
protected function normalizeArray(array $value)
    {
        array_walk($value, function(&$item) {
            if (is_object($item) || is_array($item)) {
                $item = var_export($item, true);
            }
        });

        return $value;
    }
954202
public function createConditions(array $data): array
    {
        return array_map(function ($data) {
            if ($data instanceof self) {
                return $data;
            }

            return self::createFromData((array) $data);
        }, $data);
    }
982240
protected function asArray($data = []): array
    {
        if ($data instanceof Collection) {
            $data = $data->all();
        } elseif ($data instanceof Arrayable) {
            $data = $data->toArray();
        }

        return $data;
    }
1036926
public static function arrayColumns(array $data)
    {
        // Count the amount of values from the source input
        $count = count($data);

        if ($count === 0) {
            return false;
        }

        if ($count === 1) {
            return array_keys($data[0]);
        }

        if (isset($data[0])) {
            return array_keys($data[0]);
        } else {
            return false;
        }
    }
83270
protected function decodeData($data): array
    {
        if (!\is_array($data)) {
            return [];
        }

        // Decode JSON encoded fields and merge them to data.
        if (isset($data['_json'])) {
            $data = array_replace_recursive($data, $this->jsonDecode($data['_json']));
            unset($data['_json']);
        }

        return $data;
    }
560395
protected function asArray($data)
  {
    $array = [];
    
    foreach(get_object_vars((object)$data) as $k => $v){
      if ( is_object($v) ){
        $array[$k] = $this->asArray($v);
      }
      else {
        $array[$k] = $v;
      }
    }
    
    return $array;
  }
1219730
protected function parseTypeAndId(array $data)
    {
        $idx  = $this->getArrayValue($data, DocumentInterface::KEYWORD_ID, null);
        $type = $this->getArrayValue($data, DocumentInterface::KEYWORD_TYPE, null);

        return [$type, $idx];
    }
544307
public function createRules(array $data): array
    {
        return array_map(function ($data) {
            if ($data instanceof Rule) {
                return $data;
            }

            return Rule::createFromData((array) $data);
        }, $data);
    }
113026
public function process(array $data)
    {
        $processedData = [
            'meta' => Hash::get($data, 'meta'),
            'data' => []
        ];
        $processedData['meta']['type'] = 'Module';
        $processedData['meta']['title'] = $this->name();
        unset($data['meta']);
        foreach ($data as $attr => $value) {
            $processedData['data'][$attr] = $value;
        }
        return $processedData;
    }
698318
private function toArrayData(array $data){
		foreach ($data as $key => &$val){

			if (is_object($val)){
				if ($val instanceof self){
					$val = $val->toArray();
				}
				elseif ($val instanceof DateTimeInterface) {
					$val = $val->format(self::DATE_FORMAT);
				}
				else {
					$val = (array) $val;
				}
			}

			if (is_array($val)){
				$val = $this->toArrayData($val);
			}
		}

		return $data;
	}
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;
    }
731130
protected function normalizeArray(array $data)
    {
        $ret = [];

        foreach ($data as $key => $value) {
            if (!\is_string($key)) {
                continue;
            }

            $ret[$key[0]] = [
                'value' => $value,
                'pattern' => $key,
            ];
        }

        return $ret;
    }
276179
protected function formatData(array $data)
    {
        $formatted = [];

        foreach ($data as $key => $value) {
            if (is_array($value)) {
                if (isset($value['value'])) {
                    $formatted[$key] = $value;

                    continue;
                }

                if (count($value) >= 2) {
                    $value = [
                        'value' => $value[0],
                        'color' => $value[1],
                    ];
                }
            } else {
                $value = [
                    'value' => strval($value),
                ];
            }

            $formatted[$key] = $value;
        }

        return $formatted;
    }
1214620
public static function format(array $data) {
        return array_map(function ($item) {
            $args = static::toArrOrNone($item);
            if (false !== $args) {
                return $args;
            }
            return $item;
        }, $data);
    }
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;
    }
66138
public function getObjectIdentifierFromData(array $data) : array
    {
        $identifier = [];

        foreach ($this->class->getIdentifier() as $name) {
            $identifier[$name] = $data[$name];
        }

        return $identifier;
    }
313110
protected function arrayDotKeysFlattern(array $data)
    {
        foreach ($data as $name => $values) {
            if ($this->isIterable($values)) {
                foreach ($values as $key => $key_value) {
                    $data["$name.$key"] = $values[$key];
                }
                unset($data[$name]);
            }
        }
        return $data;
    }