@@ -65,7 +65,7 @@ |
||
65 | 65 | |
66 | 66 | // @todo: whitelist types? |
67 | 67 | $nolengthtypes = ['DATE', 'TINYBLOB', 'TINYTEXT', 'BLOB', 'TEXT', 'MEDIUMBLOB', |
68 | - 'MEDIUMTEXT', 'LONGBLOB', 'LONGTEXT', 'SERIAL', 'BOOLEAN', 'UUID']; |
|
68 | + 'MEDIUMTEXT', 'LONGBLOB', 'LONGTEXT', 'SERIAL', 'BOOLEAN', 'UUID']; |
|
69 | 69 | |
70 | 70 | $field[] = (is_int($length) || is_string($length) && count(explode(',', $length)) === 2) && !in_array($type, $nolengthtypes) |
71 | 71 | ? $type.'('. $length . ')' |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $sql .= ' ('.PHP_EOL."\t".implode(','.PHP_EOL."\t", $this->cols); |
37 | 37 | |
38 | 38 | if($this->primaryKey){ |
39 | - $sql .=','.PHP_EOL."\t".'PRIMARY KEY ('.$this->quote($this->primaryKey).')'; |
|
39 | + $sql .= ','.PHP_EOL."\t".'PRIMARY KEY ('.$this->quote($this->primaryKey).')'; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | $sql .= PHP_EOL.')'; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | 'MEDIUMTEXT', 'LONGBLOB', 'LONGTEXT', 'SERIAL', 'BOOLEAN', 'UUID']; |
69 | 69 | |
70 | 70 | $field[] = (is_int($length) || is_string($length) && count(explode(',', $length)) === 2) && !in_array($type, $nolengthtypes) |
71 | - ? $type.'('. $length . ')' |
|
71 | + ? $type.'('.$length.')' |
|
72 | 72 | : $type; |
73 | 73 | |
74 | 74 | if($attribute){ |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | $n = explode('.', $this->name); |
34 | 34 | |
35 | - $sql .= $this->quote($n[count($n)-1]); |
|
35 | + $sql .= $this->quote($n[count($n) - 1]); |
|
36 | 36 | |
37 | 37 | $cols = []; |
38 | 38 | |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | $field[] = $type_translation[$type]; |
95 | 95 | } |
96 | 96 | else if(in_array($type, ['CHAR', 'VARCHAR', 'DECIMAL', 'NUMERIC', '', '', ])){ |
97 | - $field[] = $type.'('. $length . ')'; |
|
97 | + $field[] = $type.'('.$length.')'; |
|
98 | 98 | } |
99 | 99 | else{ |
100 | 100 | $field[] = $type; |