@@ -76,7 +76,7 @@ |
||
76 | 76 | { |
77 | 77 | foreach ($JsonExtractor->getTablesArray() as $TableName => $TableColumn) { |
78 | 78 | $this->capsule::schema()->dropIfExists($TableName); |
79 | - $this->capsule::schema()->create($TableName, function ($table) use ($TableColumn) { |
|
79 | + $this->capsule::schema()->create($TableName, function($table) use ($TableColumn) { |
|
80 | 80 | foreach ($TableColumn as $column_item) { |
81 | 81 | switch ($column_item['type']) { |
82 | 82 | case 'int': |
@@ -87,12 +87,12 @@ discard block |
||
87 | 87 | } |
88 | 88 | foreach ($data as $table_name => $value) { |
89 | 89 | if ($this->snake_case_table) { |
90 | - $table_name = $this->snakeCase($prefix . $table_name); |
|
90 | + $table_name = $this->snakeCase($prefix.$table_name); |
|
91 | 91 | } |
92 | 92 | if (is_array($value) && is_object($value[0])) {//if it's a array and firs element is not a object |
93 | - $this->toMysqlData($value, $table_name . '_'); |
|
93 | + $this->toMysqlData($value, $table_name.'_'); |
|
94 | 94 | } elseif (is_object($value) || is_array($value)) { |
95 | - $this->toMysqlData($value, $table_name . '_'); |
|
95 | + $this->toMysqlData($value, $table_name.'_'); |
|
96 | 96 | $this->getTableData($table_name, $value); |
97 | 97 | } |
98 | 98 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $DataItem[] = ['value' => $item_value]; |
127 | 127 | } |
128 | 128 | |
129 | - $this->data[$table_name] = array_merge(($this->data[$table_name]??[]), $DataItem); |
|
129 | + $this->data[$table_name] = array_merge(($this->data[$table_name]??[]), $DataItem); |
|
130 | 130 | } |
131 | 131 | } |
132 | 132 | } |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | if ($this->snake_case_column) { |
157 | 157 | return [ |
158 | 158 | 'name' => $table, |
159 | - 'column' => array_map(function ($item) { |
|
159 | + 'column' => array_map(function($item) { |
|
160 | 160 | return [ |
161 | 161 | 'name' => $this->snakeCase($item['name']), |
162 | 162 | 'type' => $item['type'] |