@@ -234,24 +234,24 @@ discard block |
||
| 234 | 234 | $result = ''; |
| 235 | 235 | $result .= $this->stringEscape($this->operation); |
| 236 | 236 | |
| 237 | - $result .= ' ' . $this->selectFieldsToString($this->fields); |
|
| 237 | + $result .= ' '.$this->selectFieldsToString($this->fields); |
|
| 238 | 238 | |
| 239 | 239 | $result .= ' FROM'; |
| 240 | - $result .= ' `{{' . $this->stringEscape($this->table) . '}}`'; |
|
| 241 | - $result .= !empty($this->alias) ? ' AS `' . $this->stringEscape($this->alias) . '`' : ''; |
|
| 240 | + $result .= ' `{{'.$this->stringEscape($this->table).'}}`'; |
|
| 241 | + $result .= !empty($this->alias) ? ' AS `'.$this->stringEscape($this->alias).'`' : ''; |
|
| 242 | 242 | |
| 243 | 243 | // TODO - fields should be escaped !! |
| 244 | - $result .= !empty($this->where) ? ' WHERE ' . implode(' AND ', $this->where) : ''; |
|
| 244 | + $result .= !empty($this->where) ? ' WHERE '.implode(' AND ', $this->where) : ''; |
|
| 245 | 245 | |
| 246 | 246 | // TODO - fields should be escaped !! |
| 247 | - $result .= !empty($this->group) ? ' GROUP BY ' . implode(',', $this->group) : ''; |
|
| 247 | + $result .= !empty($this->group) ? ' GROUP BY '.implode(',', $this->group) : ''; |
|
| 248 | 248 | |
| 249 | 249 | // TODO - fields should be escaped !! |
| 250 | - $result .= !empty($this->order) ? ' ORDER BY ' . implode(',', $this->order) : ''; |
|
| 250 | + $result .= !empty($this->order) ? ' ORDER BY '.implode(',', $this->order) : ''; |
|
| 251 | 251 | |
| 252 | 252 | // TODO - fields should be escaped !! |
| 253 | 253 | // TODO - separate offset and row_count |
| 254 | - $result .= !empty($this->limit) ? ' LIMIT ' . implode(' OFFSET ', $this->limit) : ''; |
|
| 254 | + $result .= !empty($this->limit) ? ' LIMIT '.implode(' OFFSET ', $this->limit) : ''; |
|
| 255 | 255 | |
| 256 | 256 | // TODO - protect from double escape! |
| 257 | 257 | |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | */ |
| 290 | 290 | protected function processField($fieldName) { |
| 291 | 291 | if (is_bool($fieldName)) { |
| 292 | - $result = (string)intval($fieldName); |
|
| 292 | + $result = (string) intval($fieldName); |
|
| 293 | 293 | } elseif (is_null($fieldName)) { |
| 294 | 294 | $result = 'NULL'; |
| 295 | 295 | } elseif ($fieldName === '*') { |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | * @return string |
| 308 | 308 | */ |
| 309 | 309 | protected function processFieldDefault($fieldName) { |
| 310 | - $result = (string)$fieldName; |
|
| 310 | + $result = (string) $fieldName; |
|
| 311 | 311 | if ( |
| 312 | 312 | $result != '' |
| 313 | 313 | && |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | !is_numeric($fieldName) |
| 319 | 319 | ) { |
| 320 | 320 | // Other should be formatted |
| 321 | - $result = '`' . $this->stringEscape($result) . '`'; |
|
| 321 | + $result = '`'.$this->stringEscape($result).'`'; |
|
| 322 | 322 | } |
| 323 | 323 | |
| 324 | 324 | return $result; |