@@ -85,23 +85,23 @@ discard block |
||
85 | 85 | // Get tables to ignore |
86 | 86 | $config = config('db-exporter.seeds'); |
87 | 87 | $ignore_tables = collect([]); |
88 | - if(!is_null($config) && isset($config['ignore_tables']) && !is_null($config['ignore_tables'])) { |
|
88 | + if (!is_null($config) && isset($config['ignore_tables']) && !is_null($config['ignore_tables'])) { |
|
89 | 89 | $ignore_tables = collect($config['ignore_tables']); |
90 | 90 | } |
91 | 91 | |
92 | 92 | $show_tables = collect([]); |
93 | - if(!is_null($config) && isset($config['use_tables']) && !is_null($config['use_tables'])) { |
|
93 | + if (!is_null($config) && isset($config['use_tables']) && !is_null($config['use_tables'])) { |
|
94 | 94 | $show_tables = collect($config['use_tables']); |
95 | 95 | } |
96 | 96 | |
97 | 97 | // Loop over the tables |
98 | 98 | foreach ($tables as $key => $value) |
99 | 99 | { |
100 | - if($show_tables->count() > 0 && !$show_tables->contains($value['table_name'])) { |
|
100 | + if ($show_tables->count() > 0 && !$show_tables->contains($value['table_name'])) { |
|
101 | 101 | continue; |
102 | 102 | } |
103 | 103 | |
104 | - if($ignore_tables->contains($value['table_name'])) { |
|
104 | + if ($ignore_tables->contains($value['table_name'])) { |
|
105 | 105 | continue; |
106 | 106 | } |
107 | 107 | |
@@ -134,11 +134,11 @@ discard block |
||
134 | 134 | ];"; |
135 | 135 | |
136 | 136 | if ($this->hasTableData($tableData)) { |
137 | - $stub = $insertStub.' |
|
137 | + $stub = $insertStub . ' |
|
138 | 138 | |
139 | 139 | foreach($data as $item) |
140 | 140 | { |
141 | - $this->saveData("'.$tableName.'", $item); |
|
141 | + $this->saveData("'.$tableName . '", $item); |
|
142 | 142 | }'; |
143 | 143 | $result[$tableName] = $stub; |
144 | 144 | } |
@@ -172,13 +172,13 @@ discard block |
||
172 | 172 | |
173 | 173 | private function insertPropertyAndValue($prop, $value) |
174 | 174 | { |
175 | - if(strlen($prop) > 0) { |
|
175 | + if (strlen($prop) > 0) { |
|
176 | 176 | $prop = "'{$prop}'"; |
177 | 177 | } else { |
178 | 178 | $prop = 'null'; |
179 | 179 | } |
180 | 180 | |
181 | - if(strlen($value) > 0) { |
|
181 | + if (strlen($value) > 0) { |
|
182 | 182 | $value = str_replace("'", "\'", $value); |
183 | 183 | $value = "'{$value}'"; |
184 | 184 | } else { |