@@ -72,13 +72,13 @@ discard block |
||
72 | 72 | $sql[] = 'TEMPORARY'; |
73 | 73 | } |
74 | 74 | |
75 | - $sql[] = 'TABLE' ; |
|
75 | + $sql[] = 'TABLE'; |
|
76 | 76 | |
77 | 77 | if($ifNotExists){ |
78 | - $sql[] = 'IF NOT EXISTS' ; |
|
78 | + $sql[] = 'IF NOT EXISTS'; |
|
79 | 79 | } |
80 | 80 | |
81 | - $sql[] = $this->quote($table); |
|
81 | + $sql[] = $this->quote($table); |
|
82 | 82 | |
83 | 83 | if(!empty($cols)){ |
84 | 84 | $sql[] = '('; |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | if(!empty($primaryKey)){ |
88 | 88 | $sql[] = ', PRIMARY KEY ('; |
89 | 89 | $sql[] = $this->quote($primaryKey); |
90 | - $sql[] = ')'; |
|
90 | + $sql[] = ')'; |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | $sql[] = ')'; |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | 'MEDIUMTEXT', 'LONGBLOB', 'LONGTEXT', 'SERIAL', 'BOOLEAN', 'UUID']; |
123 | 123 | |
124 | 124 | $field[] = (is_int($length) || (is_string($length) && count(explode(',', $length)) === 2)) && !in_array($type, $nolengthtypes, true) |
125 | - ? $type.'('. $length . ')' |
|
125 | + ? $type.'('.$length.')' |
|
126 | 126 | : $type; |
127 | 127 | |
128 | 128 | if($attribute){ |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $field[] = 'DEFAULT NULL'; |
165 | 165 | break; |
166 | 166 | default: |
167 | - $field[] = 'DEFAULT '.(is_int($defaultValue) || is_float($defaultValue) ? $defaultValue : '\''.$defaultValue.'\'') ; |
|
167 | + $field[] = 'DEFAULT '.(is_int($defaultValue) || is_float($defaultValue) ? $defaultValue : '\''.$defaultValue.'\''); |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | } |
@@ -56,7 +56,7 @@ |
||
56 | 56 | |
57 | 57 | /** @inheritdoc */ |
58 | 58 | public function createDatabase(string $dbname, bool $ifNotExists = null, string $collate = null):array{ |
59 | - $sql = [ 'CREATE DATABASE']; |
|
59 | + $sql = ['CREATE DATABASE']; |
|
60 | 60 | $sql[] = $this->quote($dbname); |
61 | 61 | |
62 | 62 | if($collate){ |
@@ -187,7 +187,7 @@ |
||
187 | 187 | |
188 | 188 | /** @inheritdoc */ |
189 | 189 | public function truncate(string $table):array{ |
190 | - $sql = ['DELETE FROM'];// RECREATE TABLE [table spec] ...stupid firebird 2.5 |
|
190 | + $sql = ['DELETE FROM']; // RECREATE TABLE [table spec] ...stupid firebird 2.5 |
|
191 | 191 | $sql[] = $this->quote($table); |
192 | 192 | |
193 | 193 | return $sql; |
@@ -108,7 +108,7 @@ |
||
108 | 108 | |
109 | 109 | /** @inheritdoc */ |
110 | 110 | public function truncate(string $table):array{ |
111 | - $sql = ['DELETE FROM'];// ??? sqlite |
|
111 | + $sql = ['DELETE FROM']; // ??? sqlite |
|
112 | 112 | $sql[] = $this->quote($table); |
113 | 113 | |
114 | 114 | return $sql; |
@@ -69,7 +69,7 @@ |
||
69 | 69 | throw new QueryException('postgres insert on conflict: no conflict target given'); |
70 | 70 | } |
71 | 71 | |
72 | - $sql[] = 'ON CONFLICT ('.$this->quote($conflictTarget).') DO'; |
|
72 | + $sql[] = 'ON CONFLICT ('.$this->quote($conflictTarget).') DO'; |
|
73 | 73 | |
74 | 74 | switch($onConflict){ |
75 | 75 | case 'IGNORE': |
@@ -30,7 +30,7 @@ |
||
30 | 30 | |
31 | 31 | /** @inheritdoc */ |
32 | 32 | public function callback(iterable $values, callable $callback){ |
33 | - $sql = $this->sql(true); |
|
33 | + $sql = $this->sql(true); |
|
34 | 34 | |
35 | 35 | $this->logger->debug('MultiQueryTrait::callback()', ['method' => __METHOD__, 'sql' => $sql, 'val' => $values]); |
36 | 36 |
@@ -65,7 +65,7 @@ |
||
65 | 65 | throw new DatabaseException('invalid driver interface'); |
66 | 66 | } |
67 | 67 | |
68 | - $this->query = new QueryBuilder($this->driver, $this->logger); |
|
68 | + $this->query = new QueryBuilder($this->driver, $this->logger); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | : $this->dialect->quote($val1) |
63 | 63 | ]; |
64 | 64 | |
65 | - if(in_array($operator, ['IN', 'NOT IN', 'ANY', 'SOME',], true)){ |
|
65 | + if(in_array($operator, ['IN', 'NOT IN', 'ANY', 'SOME', ], true)){ |
|
66 | 66 | |
67 | 67 | if(is_array($val2)){ |
68 | 68 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | elseif(in_array(strtolower($val2), ['null', 'false', 'true', 'unknown'], true)){ |
101 | 101 | $where[] = strtoupper($val2); |
102 | 102 | } |
103 | - else { |
|
103 | + else{ |
|
104 | 104 | |
105 | 105 | if($bind){ |
106 | 106 | $where[] = '?'; |
@@ -159,9 +159,9 @@ discard block |
||
159 | 159 | $where = []; |
160 | 160 | |
161 | 161 | foreach($this->where as $k => $v){ |
162 | - $last = $this->where[$k-1] ?? false; |
|
162 | + $last = $this->where[$k - 1] ?? false; |
|
163 | 163 | |
164 | - if(in_array($v, $this->joinArgs + ['(', ')'], true)){ |
|
164 | + if(in_array($v, $this->joinArgs + ['(', ')'], true)){ |
|
165 | 165 | $where[] = $v; |
166 | 166 | |
167 | 167 | continue; |