Passed
Push — master ( 5da71d...15b7b4 )
by Goffy
04:41 queued 02:07
created
class/Common/MigrateHelper.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                 $skip = false;
95 95
                 $options = '';
96 96
                 // start table definition
97
-                $tableName = $this->getTableName ($line);
97
+                $tableName = $this->getTableName($line);
98 98
                 $tables[$tableName] = [];
99 99
                 $tables[$tableName]['options'] = '';
100 100
                 $tables[$tableName]['columns'] = [];
@@ -183,10 +183,10 @@  discard block
 block discarded – undo
183 183
      * @param  string $line
184 184
      * @return string|bool
185 185
      */
186
-    private function getTableName (string $line)
186
+    private function getTableName(string $line)
187 187
     {
188 188
 
189
-        $arrLine = \explode( '`', $line);
189
+        $arrLine = \explode('`', $line);
190 190
         if (\count($arrLine) > 0) {
191 191
             return $arrLine[1];
192 192
         }
@@ -201,12 +201,12 @@  discard block
 block discarded – undo
201 201
      * @param string $line
202 202
      * @return array|bool
203 203
      */
204
-    private function getColumns (string $line)
204
+    private function getColumns(string $line)
205 205
     {
206 206
 
207 207
         $columns = [];
208 208
 
209
-        $arrCol = \explode( ' ', \trim($line));
209
+        $arrCol = \explode(' ', \trim($line));
210 210
         if (\count($arrCol) > 0) {
211 211
             $name = \str_replace(['`'], '', $arrCol[0]);
212 212
         } else {
@@ -217,9 +217,9 @@  discard block
 block discarded – undo
217 217
         $columns['name'] = $name;
218 218
         // update quotes
219 219
         if (\strpos($attributes, "''") > 0) {
220
-            $attributes = \trim(\str_replace("''", "''''''''" , $attributes));
220
+            $attributes = \trim(\str_replace("''", "''''''''", $attributes));
221 221
         } elseif (\strpos($attributes, "'") > 0) {
222
-            $attributes = \trim(\str_replace("'", "''" , $attributes));
222
+            $attributes = \trim(\str_replace("'", "''", $attributes));
223 223
         }
224 224
         $columns['attributes'] = "' " . $attributes . " '";
225 225
 
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
      * @param string $options
235 235
      * @return void
236 236
      */
237
-    private function getOptions (string $line, string &$options): void
237
+    private function getOptions(string $line, string &$options): void
238 238
     {
239 239
 
240 240
         $lineText = \trim(\str_replace([')', ';'], '', $line));
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
      * @param string $line
254 254
      * @return array
255 255
      */
256
-    private function getKey (string $line)
256
+    private function getKey(string $line)
257 257
     {
258 258
 
259 259
         $key = [];
@@ -276,11 +276,11 @@  discard block
 block discarded – undo
276 276
                 if ('' == $name) {
277 277
                     $name = $columns;
278 278
                 }
279
-                if (\strpos($name,' ') > 0) {
279
+                if (\strpos($name, ' ') > 0) {
280 280
                     $name = "'" . $name . "'";
281 281
                 }
282 282
                 $key[$name] = [];
283
-                if (\strpos($columns,' ') > 0) {
283
+                if (\strpos($columns, ' ') > 0) {
284 284
                     $columns = "'" . $columns . "'";
285 285
                 }
286 286
                 $key[$name]['columns'] = $columns;
Please login to merge, or discard this patch.