Given the call $data, parse and return it in a format that is compatible with the HTTP Client

@param array $data
@return array the parsed array
174188
public function parseMulitpartData($data)
    {
        $multipartData = [];
        foreach($data as $name => $contents) {
            $name = strtolower($name);
            if ($name !== 'file') {
                $multipartData[] = [
                    'name' => $name,
                    'contents' => $contents
                ];
            }
        }
        return $multipartData;
    }
1125366
public static function fromData(array $data)
    {
        $reflection = new \ReflectionClass(static::class);
        $instance = $reflection->newInstanceWithoutConstructor();
        $instance->data = $data;
        $instance->jsonUnserialize($data);
        return $instance;
    }
288138
public function parse($data, $key = null)
    {
        if ($key) $this->apiKey = $key;
        return $this->get($data, [], null, 'parse');
    }
495069
private function parse(string $data = "")
    {
        try {
            $promise = $this->requestParser->send($data);

            if ($promise instanceof Promise && !$this->isExported && !($this->status & self::CLOSED_RDWR)) {
                // Parser wants to wait until a promise completes.
                $this->paused = true;
                $promise->onResolve($this->resume); // Resume will set $this->paused to false if called immediately.
                if ($this->paused) { // Avoids potential for unnecessary disable followed by enable.
                    Loop::disable($this->readWatcher);
                }
            }
        } catch (\Throwable $exception) {
            // Parser *should not* throw an exception, but in case it does...
            $this->logger->critical($exception);
            $this->close();
        }
    }
522733
protected function parseProxyData( & $data )
    {
        if ( empty( $data ) )
        {
            return array();
        }

        $result = array();
        foreach ( json_decode( $data, true ) as $field )
        {
            if ( empty( $field['name'] ) )
            {
                continue;
            }

            $name   = (string) $field['name'];
            $parts  = explode( '.', $name, 2 );
            $value  = isset( $field['value'] ) ? $field['value'] : null;

            if ( count( $parts ) > 1 )
            {
                list( $name, $sub ) = $parts;

                if ( isset( $result[$name] ) )
                {
                    if ( ! is_array( $result[$name] ) )
                    {
                        $result[$name] = (array) $result[$name];
                    }
                }
                else
                {
                    $result[$name] = array();
                }

                $result[$name][$sub] = $value;
            }
            else
            {
                $result[$name] = $value;
            }
        }

        foreach ( $result as & $value )
        {
            if ( is_array( $value ) )
            {
                uksort( $value, 'strnatcmp' );
            }
        }

        return $result;
    }
96033
public function parse($data)
    {
        if ($data === null || !is_string($data)) {
            return array();
        }

        if (substr($data, 0, 1) !== '{' &&
            substr($data, 0, 1) !== '[') {
            return array();
        }

        return (array) json_decode($data, true);
    }
50817
private function parseSockData($data)
    {
        $return = [];

        $lines = (array) explode("\n", trim($data));

        foreach ($lines as $line) {
            if (preg_match('/(\w+)\s*:\s*([-+]?[\d\.]+)/i', $line, $match) == 1) {
                $return[] = array(
                    'path' => 'N/A',
                    'name' => $match[1],
                    'temp' => $match[2],
                    'unit' => '', // TODO
                );
            }
        }

        return $return;
    }
499685
protected function getData($data):array{

		if(is_array($data)){
			return $data;
		}
		elseif($data instanceof Traversable){
			return iterator_to_array($data); // @codeCoverageIgnore
		}

		$msg = 'invalid data';
		$this->logger->error($msg);

		throw new InvalidArgumentException($msg);
	}
391893
public function readFromArray(array $data) : array
    {
        foreach($data as $key => $value)
        {
            if (is_string($value)){
                $value = $this->macro_processor->process($value);
                $data[$key] = $value;
            }
            else if(is_array($value)){
                $data[$key] = $this->readFromArray($value);
            }
        }
        return $data;
    }
34629
public static function getRoutesDataFromData(array $data): array
    {
        assert(array_key_exists(self::KEY_ROUTES_DATA, $data));
        $result = $data[self::KEY_ROUTES_DATA];

        return $result;
    }
794333
protected function prepareData($data)
    {
        if(!is_array($data))
        {
            $data = [];
        }
        
        $data['access_token'] = $this->config->accessToken;
        
        return http_build_query($data);
    }
837883
protected function parseData($data)
    {
        $hash = \hash('sha256', microtime(true));
        $value = $data;
        $filter = null;

        if (\is_array($data)) {
            $value = $this->resolveValue($data, $hash);
            $filter = $data['filter'] ?? null;
        }

        if ($value === $hash) {
            $value = $data['default'] ?? null;
        }

        if (! \is_null($filter)) {
            $value = $this->filterValue($value, $filter);
        }

        return $value;
    }
921957
protected function unformatPayloadData(array $data)
    {
        $unformattedData = array();

        foreach ($data as $key => $value) {
            $newKey = $this->deserializeColumnName($key);

            if (is_array($value)) {
                $newValue = $this->unformatPayloadData($value);
            } else {
                $newValue = $value;
            }

            $unformattedData[$newKey] = $newValue;
        }

        return $unformattedData;
    }
77472
public function decode($data)
    {
        $xml = simplexml_load_string($data, "SimpleXMLElement", LIBXML_NOCDATA);
        $json = json_encode($xml);
        $this->arrayData = json_decode($json, true);
        return $this->arrayData;
    }
471315
private function getRequestData(string $data) : array
    {
        if (preg_match_all('`\\&([^=]+)\\=`', '&' . $data, $matches)) {
            foreach (array_count_values($matches[1]) as $key => $count) {
                if ($count <= 1) {
                    continue;
                }
                if (stripos($key, '[') !== false) {
                    continue;
                }

                $data = str_replace('&' . $key . '=', '&' . $key . '[]=', $data);

                if (strpos($data, $key . '=') === 0) {
                    $data = $key . '[]' . substr($data, strpos($data, '='));
                }
            }
        }

        parse_str($data, $return);

        return is_array($return) ? $return : [];
    }
1279980
public function decode($data)
    {
        $out = array();

        $this->_data = $data;
        $this->_datalen = strlen($data);
        $this->_ptr = 0;

        while ($this->_curr() !== false) {
            $this->_rfc822SkipLwsp();

            $this->_rfc822ParseMimeToken($param);

            if (is_null($param) || ($this->_curr() != '=')) {
                break;
            }

            ++$this->_ptr;
            $this->_rfc822SkipLwsp();

            $value = '';

            if ($this->_curr() == '"') {
                try {
                    $this->_rfc822ParseQuotedString($value);
                } catch (Horde_Mail_Exception $e) {
                    break;
                }
            } else {
                $this->_rfc822ParseMimeToken($value);
                if (is_null($value)) {
                    break;
                }
            }

            $out[$param] = $value;

            $this->_rfc822SkipLwsp();
            if ($this->_curr() != ';') {
                break;
            }

            ++$this->_ptr;
        }

        return $out;
    }
241382
private function parse(array $data)
    {
        $config = [];

        foreach ($data as $section => $value) {
            if (is_array($value)) {
                if (strpos($section, $this->nestSeparator) !== false) {
                    $sections = explode($this->nestSeparator, $section);
                    $config = array_merge_recursive($config, $this->buildNestedSection($sections, $value));
                } else {
                    $config[$section] = $this->parseSection($value);
                }
            } else {
                $this->parseKey($section, $value, $config);
            }
        }

        return $config;
    }