protected function parseData(array $data): array
    {
        $newData = [];

        foreach ($data as $key => $value) {
            if (\is_array($value)) {
                return $this->parseData($value);
            }
            $newData[$key] = $value;
        }

        return $newData;
    }
protected function parseData(array $data): array
    {
        $newData = [];

        foreach ($data as $key => $value) {
            if (\is_array($value)) {
                return $this->parseData($value);
            }
            $newData[$key] = $value;
        }

        return $newData;
    }
protected function parseData ( array $ data ) : array { $ newData = [ ] ; foreach ( $ data as $ key => $ value ) { if ( \ is_array ( $ value ) ) { return $ this -> parseData ( $ value ) ; } $ newData [ $ key ] = $ value ; } return $ newData ; }
Parse the data array.

@param array $data

@return array
Parse the data array .