Completed
Push — master ( d0c126...fcb1ca )
by Supun
07:05
created
src/Extractor/JsonExtractor.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
 
64 64
             if (is_array($value) && is_object($value[0])) {//check whether it's a array and it's firs element is a object
65 65
 
66
-                $table_data = $this->getTable($prefix . $table_name, $value);//get table sql
66
+                $table_data = $this->getTable($prefix.$table_name, $value); //get table sql
67 67
                 $this->table[$table_data['name']] = $table_data['column'];
68 68
 
69
-                $this->toMysqlTables($this->getHighestColumnArray($value), $prefix . $table_name . '_');//get it inside tables
69
+                $this->toMysqlTables($this->getHighestColumnArray($value), $prefix.$table_name.'_'); //get it inside tables
70 70
             } elseif (is_array($value) || is_object($value)) {//if it's a array and  firs element is not a object
71 71
 
72
-                $table_data = $this->getTable($prefix . $table_name, $value);
72
+                $table_data = $this->getTable($prefix.$table_name, $value);
73 73
                 $this->table[$table_data['name']] = $table_data['column'];
74 74
             }
75 75
 
@@ -85,13 +85,13 @@  discard block
 block discarded – undo
85 85
         }
86 86
         foreach ($data as $table_name => $value) {
87 87
             if ($this->snake_case_table) {
88
-                $table_name = $this->snakeCase($prefix . $table_name);
88
+                $table_name = $this->snakeCase($prefix.$table_name);
89 89
             }
90 90
 
91 91
             if (is_array($value)) {//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)) {
94
-                $this->toMysqlData($value, $table_name . '_');
94
+                $this->toMysqlData($value, $table_name.'_');
95 95
             }
96 96
 
97 97
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     }
100 100
 
101 101
     //TODO
102
-    public function getTableData(){
102
+    public function getTableData() {
103 103
 
104 104
     }
105 105
 
@@ -252,13 +252,13 @@  discard block
 block discarded – undo
252 252
                 } elseif (is_numeric($item)) {
253 253
                     $value[] = $item;
254 254
                 } else {
255
-                    $value[] = '"' . addcslashes($item, "W") . '"';
255
+                    $value[] = '"'.addcslashes($item, "W").'"';
256 256
                 }
257 257
             }
258
-            $String[] = '(' . implode(",", $value) . ')';
258
+            $String[] = '('.implode(",", $value).')';
259 259
         }
260 260
 
261
-        return "values" . implode(", ", $String);
261
+        return "values".implode(", ", $String);
262 262
     }
263 263
 
264 264
     /**
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
     {
270 270
         $String = [];
271 271
         foreach ($array as $column) {
272
-            $String[] = "`" . JsonExtractor::snakeCase($column['name']) . "`";
272
+            $String[] = "`".JsonExtractor::snakeCase($column['name'])."`";
273 273
         }
274 274
 
275 275
         return implode(",", $String);
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
         } elseif (empty($Data)) {
290 290
             return $empty_val;
291 291
         } else {
292
-            return (string)$Data;
292
+            return (string) $Data;
293 293
         }
294 294
     }
295 295
 }
Please login to merge, or discard this patch.