@@ -187,23 +187,23 @@ discard block |
||
187 | 187 | $result = ''; |
188 | 188 | $result .= $this->stringEscape($this->operation); |
189 | 189 | |
190 | - $result .= ' ' . $this->selectFieldsToString($this->fields); |
|
190 | + $result .= ' '.$this->selectFieldsToString($this->fields); |
|
191 | 191 | |
192 | 192 | $result .= ' FROM'; |
193 | - $result .= ' `{{' . $this->stringEscape($this->table) . '}}`'; |
|
194 | - $result .= !empty($this->alias) ? ' AS `' . $this->stringEscape($this->alias) . '`' : ''; |
|
193 | + $result .= ' `{{'.$this->stringEscape($this->table).'}}`'; |
|
194 | + $result .= !empty($this->alias) ? ' AS `'.$this->stringEscape($this->alias).'`' : ''; |
|
195 | 195 | |
196 | 196 | // TODO - fields should be escaped !! |
197 | - $result .= !empty($this->where) ? ' WHERE ' . implode(' AND ', $this->where) : ''; |
|
197 | + $result .= !empty($this->where) ? ' WHERE '.implode(' AND ', $this->where) : ''; |
|
198 | 198 | |
199 | 199 | // TODO - fields should be escaped !! |
200 | - $result .= !empty($this->group) ? ' GROUP BY ' . implode(',', $this->group) : ''; |
|
200 | + $result .= !empty($this->group) ? ' GROUP BY '.implode(',', $this->group) : ''; |
|
201 | 201 | |
202 | 202 | // TODO - fields should be escaped !! |
203 | - $result .= !empty($this->order) ? ' ORDER BY ' . implode(',', $this->order) : ''; |
|
203 | + $result .= !empty($this->order) ? ' ORDER BY '.implode(',', $this->order) : ''; |
|
204 | 204 | |
205 | 205 | // TODO - fields should be escaped !! |
206 | - $result .= !empty($this->limit) ? ' LIMIT ' . implode(',', $this->limit) : ''; |
|
206 | + $result .= !empty($this->limit) ? ' LIMIT '.implode(',', $this->limit) : ''; |
|
207 | 207 | |
208 | 208 | // TODO - protect from double escape! |
209 | 209 | |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | |
224 | 224 | $result = array(); |
225 | 225 | foreach ($fields as $fieldName) { |
226 | - switch(true) { |
|
226 | + switch (true) { |
|
227 | 227 | // case $fieldName === '*': |
228 | 228 | // $result[] = '*'; |
229 | 229 | // break; |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | } |
257 | 257 | |
258 | 258 | protected function processFieldDefault($fieldName) { |
259 | - $result = (string)$fieldName; |
|
259 | + $result = (string) $fieldName; |
|
260 | 260 | if ( |
261 | 261 | $result != '' |
262 | 262 | && |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | !is_numeric($fieldName) |
271 | 271 | ) { |
272 | 272 | // Other should be formatted |
273 | - $result = '`' . $this->stringEscape($result) . '`'; |
|
273 | + $result = '`'.$this->stringEscape($result).'`'; |
|
274 | 274 | } |
275 | 275 | |
276 | 276 | return $result; |