@@ -73,13 +73,13 @@ discard block |
||
73 | 73 | |
74 | 74 | if (is_array($value) && is_object($value[0])) {//check whether it's a array and it's firs element is a object |
75 | 75 | |
76 | - $table_data = $this->getTable($prefix . $table_name, $value); //get table sql |
|
76 | + $table_data = $this->getTable($prefix.$table_name, $value); //get table sql |
|
77 | 77 | $this->table[$table_data['name']] = $table_data['column']; |
78 | 78 | |
79 | - $this->toMysqlTables($this->getHighestColumnArray($value), $prefix . $table_name . "_"); //get it inside tables |
|
79 | + $this->toMysqlTables($this->getHighestColumnArray($value), $prefix.$table_name."_"); //get it inside tables |
|
80 | 80 | } elseif (is_array($value) || is_object($value)) {//if it's a array and firs element is not a object |
81 | 81 | |
82 | - $table_data = $this->getTable($prefix . $table_name, $value); |
|
82 | + $table_data = $this->getTable($prefix.$table_name, $value); |
|
83 | 83 | $this->table[$table_data['name']] = $table_data['column']; |
84 | 84 | } |
85 | 85 | } |
@@ -97,12 +97,12 @@ discard block |
||
97 | 97 | } |
98 | 98 | foreach ($data as $table_name => $value) { |
99 | 99 | if ($this->snake_case_table) { |
100 | - $table_name = $this->snakeCase($prefix . $table_name); |
|
100 | + $table_name = $this->snakeCase($prefix.$table_name); |
|
101 | 101 | } |
102 | 102 | if (is_array($value) && !empty($value) && is_object($value[0])) {//if it's a array and firs element is not a object |
103 | - $this->toMysqlData($value, $table_name . '_'); |
|
103 | + $this->toMysqlData($value, $table_name.'_'); |
|
104 | 104 | } elseif (is_object($value) || is_array($value)) { |
105 | - $this->toMysqlData($value, $table_name . '_'); |
|
105 | + $this->toMysqlData($value, $table_name.'_'); |
|
106 | 106 | $this->getTableData($table_name, $value); |
107 | 107 | } |
108 | 108 | } |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | if ($this->snake_case_column) { |
159 | 159 | return [ |
160 | 160 | 'name' => $table, |
161 | - 'column' => array_map(function ($item) { |
|
161 | + 'column' => array_map(function($item) { |
|
162 | 162 | return [ |
163 | 163 | 'name' => $this->snakeCase($item['name']), |
164 | 164 | 'type' => $item['type'], |
@@ -336,13 +336,13 @@ discard block |
||
336 | 336 | } elseif (is_numeric($item)) { |
337 | 337 | $value[] = $item; |
338 | 338 | } else { |
339 | - $value[] = '"' . addcslashes($item, "W") . '"'; |
|
339 | + $value[] = '"'.addcslashes($item, "W").'"'; |
|
340 | 340 | } |
341 | 341 | } |
342 | - $String[] = '(' . implode(",", $value) . ')'; |
|
342 | + $String[] = '('.implode(",", $value).')'; |
|
343 | 343 | } |
344 | 344 | |
345 | - return "values" . implode(", ", $String); |
|
345 | + return "values".implode(", ", $String); |
|
346 | 346 | } |
347 | 347 | |
348 | 348 | /** |
@@ -353,7 +353,7 @@ discard block |
||
353 | 353 | { |
354 | 354 | $String = []; |
355 | 355 | foreach ($array as $column) { |
356 | - $String[] = "`" . JsonExtractor::snakeCase($column['name']) . "`"; |
|
356 | + $String[] = "`".JsonExtractor::snakeCase($column['name'])."`"; |
|
357 | 357 | } |
358 | 358 | |
359 | 359 | return implode(",", $String); |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | } elseif (empty($Data)) { |
374 | 374 | return $empty_val; |
375 | 375 | } else { |
376 | - return (string)$Data; |
|
376 | + return (string) $Data; |
|
377 | 377 | } |
378 | 378 | } |
379 | 379 | } |