@@ -86,12 +86,12 @@ discard block |
||
| 86 | 86 | } |
| 87 | 87 | foreach ($data as $table_name => $value) { |
| 88 | 88 | if ($this->snake_case_table) { |
| 89 | - $table_name = $this->snakeCase($prefix . $table_name); |
|
| 89 | + $table_name = $this->snakeCase($prefix.$table_name); |
|
| 90 | 90 | } |
| 91 | 91 | if (is_array($value) && !empty($value) && is_object($value[0])) {//if it's a array and firs element is not a object |
| 92 | - $this->toMysqlData($value, $table_name . '_'); |
|
| 92 | + $this->toMysqlData($value, $table_name.'_'); |
|
| 93 | 93 | } elseif (is_object($value) || is_array($value)) { |
| 94 | - $this->toMysqlData($value, $table_name . '_'); |
|
| 94 | + $this->toMysqlData($value, $table_name.'_'); |
|
| 95 | 95 | $this->getTableData($table_name, $value); |
| 96 | 96 | } |
| 97 | 97 | } |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | $DataItem[] = ['value' => $item_value]; |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | - $this->data[$table_name] = array_unique(array_merge(($this->data[$table_name]??[]), $DataItem)); |
|
| 128 | + $this->data[$table_name] = array_unique(array_merge(($this->data[$table_name]??[]), $DataItem)); |
|
| 129 | 129 | } |
| 130 | 130 | } |
| 131 | 131 | } |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | if ($this->snake_case_column) { |
| 156 | 156 | return [ |
| 157 | 157 | 'name' => $table, |
| 158 | - 'column' => array_map(function ($item) { |
|
| 158 | + 'column' => array_map(function($item) { |
|
| 159 | 159 | return [ |
| 160 | 160 | 'name' => $this->snakeCase($item['name']), |
| 161 | 161 | 'type' => $item['type'] |